Skip to content

Get every widget's chart data ​

GET/api/v2/workspaces/{slug}/dashboards/{dashboard_id}/widgets/charts/

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.

FieldDescription
widget_idThe widget.
chart_typeIts chart type, to choose how to draw chart.
statusWhat 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).
chartWith status: 200, the same body as the single chart/ call. See Chart types.
errorOtherwise, the same error body the single chart/ call would return.

Path parameters ​

slug:requiredstring

The 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:optionalstring

Comma-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 ​

StatusCodeCause
400invalid_requestwidget_ids holds a value that isn't a UUID, or more than 50 widgets are selected.
401unauthorizedMissing or invalid credentials.
402payment_requiredDashboards aren't included in the workspace's plan, or you aren't a member of the workspace.
403forbiddenGuests can't use dashboards, or your token lacks the scope.
404not_foundThe dashboard doesn't exist, or you can't see it.
406not_acceptableThe Accept header asks for a representation the API can't produce.
429rate_limitedThrottled. Wait for the Retry-After header's seconds before retrying.
Get every widget's chart data
bash
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"
Response200
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"
          }
        ]
      }
    }
  ]
}
Response400
json
{
  "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."
    }
  ]
}