# Get Analytics Panel Output

See what a panel produces: its status, any failure message, and its rows, a window at a time. Check it after Update Analytics Panel, reading the draft.

`GET https://connect.mindcloud.co/v2/analytics/pages/:pageId/panels/:panelId/output`

Permissions: `analytics:page:view`.

## Parameters

### Path

- `pageId` (string, required): The page id, from List Analytics Pages.
- `panelId` (string, required): The panel id, from Get Analytics Page.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. Here a key acts in another organization only as one of its members: with "Use this key across all of your organizations" on, in an organization its creator belongs to with a role. Child organizations and MindCloud staff access do not reach this endpoint. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Query

- `version` (string): draft or published.
  Which version of the page to read. Left out: the published version when there is one, otherwise the draft.
  Allowed values:
    - `draft`: The draft, with the changes not yet published. Editors and owners only.
    - `published`: The version viewers see.
- `limit` (number): How many rows to answer, 1-1000.
  How many rows to answer, 1-1000. Defaults to 100.
  Default: `100`
- `offset` (number): How many rows to skip.
  How many rows to skip. Defaults to 0.
  Default: `0`

## Example request

```bash
curl --request GET \
  --url 'https://connect.mindcloud.co/v2/analytics/pages/Pq7Lm2Xc9RtA/panels/Kd4Rw8Zn1VbQ/output?version=draft&limit=100&offset=0' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `panelId` (string): The panel, from Get Analytics Page.
- `status` (string): Where the panel's stored result stands.
  Allowed values:
    - `ready`: Rows are ready.
    - `empty`: It ran and returned no rows.
    - `refreshing`: Its sources are fetching; the result follows.
    - `failed`: It failed; message says why.
    - `draft`: It is set up but has not produced a result yet.
    - `noResult`: It has sources but no stored result yet. Set its query or transform to run it.
    - `noDataSource`: It has no data source yet.
- `message` (string): Why it failed or is waiting. Null when there is nothing to say.
- `columns` (array of string): The column names the rows carry, in order.
- `rows` (array of objects): The rows in this window, as objects keyed by column.
- `rowCount` (number): How many rows there are in all.
- `offset` (number): Where this window starts.
- `nextOffset` (number): The offset of the next window, or null when this is the last.
- `updatedOn` (date): When the result was last written. Null when there is none.
- `version` (object): Which version of the page this answer reads.
  - `mode` (string): draft or published.
    Allowed values:
      - `draft`: The draft, with changes not yet published.
      - `published`: The version viewers see.
  - `publishedVersionId` (string): The published version read, from List Analytics Page Versions, or null when the draft is read.
