# Get every widget on one page

> Source: https://elaichi.ai/docs/api-reference/dashboards/dashboard/getdashboardpagedata/

`GET /dashboard/{id}/page/{pageKey}/data`

Resource: **Dashboard** · API: **Dashboards**

## Path parameters

- **`id`** _(string, required)_
  Resource id
- **`pageKey`** _(string, required)_
  Resource id

## Query parameters

- **`draft`** _(string)_
  Pass 1 to read the DRAFT (a manager previewing their edits). Requires edit access: 403 for anyone else. A dashboard with no draft answers the published one. Never cached.
  Allowed: `1`, `true`
- **`tz`** _(string)_
  IANA time zone for date presets. An invalid zone falls back to UTC.
- **`f.KEY`** _(string)_
  A dashboard filter value, once per value. A YYYY-MM-DD..YYYY-MM-DD range, a preset name or me for the caller. 400 filter_invalid on a bad value.

## Response body

- **`dashboard`** _(object)_
  - **`id`** _(string)_
  - **`owner_user_id`** _(string)_
  - **`name`** _(string)_
  - **`description`** _(string)_
  - **`revision`** _(integer)_
  - **`page_count`** _(integer)_
  - **`widget_count`** _(integer)_
  - **`source_summary`** _(object)_
    - **`collection_ids`** _(array<string>)_
    - **`toolbox_ids`** _(array<string>)_
  - **`created_at`** _(string)_
  - **`updated_at`** _(string)_
  - **`updated_by`** _(string,null)_
  - **`can_share`** _(boolean)_
  - **`can_manage`** _(boolean)_
  - **`can_transfer`** _(boolean)_
  - **`can_revoke_share`** _(boolean)_
  - **`can_see_shares`** _(boolean)_
  - **`owner_display_name`** _(string,null)_
  - **`owner_avatar_url`** _(string,null)_
    The person's picture: their stored profile picture, else a Gravatar URL (`d=404`, 96px) derived from their email (the address itself is not sent), else null. Draw initials when it is null or the image fails to load.
  - **`access_via`** _(string)_
  - **`access_summary`** _(unknown)_
  - **`status`** _(string)_
    draft_only: never published, so only editors can open it. published_with_changes: live, with a pending draft.
    Allowed: `published`, `draft_only`, `published_with_changes`
  - **`ever_published`** _(boolean)_
  - **`has_draft`** _(boolean)_
    A pending draft exists. Only a caller with `can_manage` is ever shown the draft itself.
  - **`live_changed_since_draft`** _(boolean)_
    The live dashboard was saved after the pending draft began, so publishing would replace that save. Only ever true for a caller with `can_manage`; the Elaichi app warns in words and sends `live_revision` on publish only after the person confirms.
  - **`draft_revision`** _(integer)_
    The guard on `PUT /dashboard/{id}/draft`. Moves on every draft save, publish and discard.
  - **`updated_via`** _(string,null)_
    How the last edit was made; null for edits that predate the draft layer.
    Allowed: `console`, `agent`, `mcp`, `api`, `null`
  - **`updated_client`** _(string,null)_
    The connected AI client's display name ("Claude") when `updated_via` is `mcp`; null when that client is unknown. Never an internal id.
  - **`source_preview`** _(array<object>)_
    At most three sources the caller can read. The total is `source_summary`; the full set is `sources` on the detail.
    - **`name`** _(string)_
    - **`resource_type`** _(string)_
      Allowed: `collection`, `toolbox`, `automation`
    - **`slug`** _(string,null)_
      The connector slug when the source has exactly one; null otherwise, never guessed.
    - **`logo`** _(string,null)_
  - **`definition`** _(unknown)_
  - **`sources`** _(array<object>)_
    - **`resource_type`** _(string)_
    - **`resource_id`** _(string)_
    - **`name`** _(string,null)_
    - **`caller_can_read`** _(boolean)_
    - **`widget_count`** _(integer)_
  - **`labels`** _(object)_
    - **`widgets`** _(unknown)_
  - **`public_links`** _(unknown)_
  - **`provenance`** _(unknown)_
  - **`updated_by_name`** _(string,null)_
  - **`draft`** _(object,null)_
    The pending draft, present only for a caller with `can_manage`; everyone else sees the published `definition`.
  - **`draft_changes`** _(object)_
    - **`count`** _(integer)_
    - **`items`** _(array<unknown>)_
    - **`more`** _(integer)_
    - **`ever_published`** _(boolean)_
  - **`can_publish`** _(boolean)_
    `can_manage` and there is a draft to publish.
  - **`publish_blocked_reason`** _(string,null)_
    Why publishing would fail right now (a widget that does not validate), else null. A source the publisher cannot read is checked by the publish itself.
  - **`can_discard_draft`** _(boolean)_
    `can_manage`, there is a draft, and the dashboard has been published (a never-published dashboard has no live version to go back to).
  - **`can_agent_edit`** _(boolean,null)_
  - **`agent_edit_blocked_by`** _(string,null)_
    Allowed: `assistant_disabled`, `llm_not_configured`, `not_permitted`, `null`
- **`page_key`** _(string)_
- **`widgets`** _(array<object>)_
  - **`widget_key`** _(string)_
  - **`kind`** _(string)_
    Allowed: `metric`, `chart`, `table`, `markdown`
  - **`state`** _(string)_
    Allowed: `ok`, `empty`, `no_access`, `source_error`
  - **`data`** _(unknown)_
  - **`disclosure`** _(object,null)_
  - **`table_page`** _(object,null)_
  - **`row_visibility`** _(string,null)_
  - **`fetched_at`** _(string,null)_
  - **`expires_at`** _(string,null)_
  - **`cached`** _(boolean)_
  - **`stale`** _(boolean)_
  - **`throttled`** _(boolean)_
  - **`error`** _(object,null)_
- **`filters`** _(array<object>)_
  Each declared filter, resolved for this read (defaults, presets in the viewer zone, `me`).
  - **`key`** _(string)_
  - **`type`** _(string)_
    Allowed: `date_range`, `select`, `multi_select`, `member`, `text`
  - **`value`** _(unknown)_
    The value in force, or null when unset.
  - **`value_label`** _(string,null)_
  - **`range`** _(object)_
    - **`start_date`** _(string,null)_
    - **`end_date`** _(string,null)_
    - **`start_at`** _(string,null)_
    - **`end_at_exclusive`** _(string,null)_
  - **`coverage`** _(object,null)_
    date_range filters with a value only: the earliest and latest YYYY-MM-DD (viewer zone) of the date fields this page binds the filter to, read as the viewer. Null when a bound field is protected for the viewer, a tool source reads the filter, or no collection source does.
- **`showing_draft`** _(boolean)_
  Only on a `?draft=1` read: whether the page is the draft’s (false when there is no draft and the live page came back).
- **`issues`** _(array<object>)_
  Only on a `?draft=1` read of a real draft: advice that needs what the run found (a widget that failed, a chart with too many groups).
  - **`severity`** _(string)_
  - **`step`** _(string,null)_
  - **`field`** _(string)_
  - **`message`** _(string)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/dashboard/<id>/page/<pageKey>/data' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/dashboard/<id>/page/<pageKey>/data', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/dashboard/<id>/page/<pageKey>/data"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
