Get every widget's chart data
A widget is one chart on a dashboard. Get the chart data of every widget on a dashboard in one call, in layout order: top to bottom, then left to right. Use it to render a whole dashboard, and Get a widget's chart data to page through one widget.
Every widget is charted at its first page. page, column_page and row_ids are ignored here, because they'd mean something different to each widget.
Each widget succeeds or fails on its own. A widget whose chart can't be built (its plan, its saved settings or filters, or a server error) carries its own status and error, and the rest still return.
| Field | Description |
|---|---|
widget_id | The widget. |
chart_type | Its chart type, to choose how to draw chart. |
status | What the single chart/ call would return for this widget: 200, 400 (saved settings or filters don't fit the chart type), 402 (chart type not on the plan) or 500 (server error). |
chart | With status: 200, the same body as the single chart/ call. See Chart types. |
error | Otherwise, the same error body the single chart/ call would return. |
Path parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
dashboard_id:requiredstring (uuid)The dashboard the widget is on.
Query parameters
widget_ids:optionalstringComma-separated widget IDs to include. Default: every widget on the dashboard. IDs that aren't on this dashboard are skipped, and an empty value (?widget_ids=) returns no widgets. A value that isn't a UUID returns 400.
A call charts at most 50 widgets. On a dashboard with more, pass widget_ids to chart them in batches.
Scopes
workspaces.dashboards.widgets:read, or the broad read scope.
Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | widget_ids holds a value that isn't a UUID, or more than 50 widgets are selected. |
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | Dashboards aren't included in the workspace's plan, or you aren't a member of the workspace. |
403 | forbidden | Guests can't use dashboards, or your token lacks the scope. |
404 | not_found | The dashboard doesn't exist, or you can't see it. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
429 | rate_limited | Throttled. Wait for the Retry-After header's seconds before retrying. |
curl -X GET \
"https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/charts/" \
-H "X-Api-Key: $PLANE_API_KEY"import requests
response = requests.get(
"https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/charts/",
headers={"X-Api-Key": "your-api-key"},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/dashboards/05186e3b-94a3-49b0-8403-9307d292daea/widgets/charts/",
{
method: "GET",
headers: {
"X-Api-Key": "your-api-key",
},
},
);
const data = await response.json();{
"data": [
{
"widget_id": "d600639b-8071-4f97-ba18-547c2651e4ab",
"chart_type": "PIE_CHART",
"status": 200,
"chart": {
"schema": {
"priority": {
"none": {
"id": "none",
"name": "None"
},
"high": {
"id": "high",
"name": "High"
},
"medium": {
"id": "medium",
"name": "Medium"
},
"urgent": {
"id": "urgent",
"name": "Urgent"
}
}
},
"data": [
{
"key": "none",
"count": 16,
"projects": {}
},
{
"key": "high",
"count": 2,
"projects": {}
},
{
"key": "medium",
"count": 2,
"projects": {}
},
{
"key": "urgent",
"count": 2,
"projects": {}
}
],
"x_axis_schema_key": "priority"
}
},
{
"widget_id": "21209034-5e3c-483b-8292-2ccc378ebdc5",
"chart_type": "NUMBER",
"status": 200,
"chart": {
"schema": {},
"value": 22,
"y_axis_metric": "WORK_ITEM_COUNT"
}
},
{
"widget_id": "4b0a6e2e-2c1f-4f39-9d1e-8a8c1f2f7d10",
"chart_type": "WORK_ITEMS_TABLE",
"status": 400,
"error": {
"type": "invalid_request",
"code": "invalid_request",
"detail": "One or more fields failed validation.",
"errors": [
{
"field": "config.columns",
"code": "invalid",
"message": "Field required"
}
]
}
}
]
}{
"type": "invalid_request",
"code": "invalid_request",
"detail": "One or more fields failed validation.",
"errors": [
{
"field": "widget_ids",
"code": "invalid",
"message": "Must be a comma-separated list of widget IDs."
}
]
}
