Dashboards API
Dashboards organize survey data into interactive visualizations with pages, elements, and sharing controls. Elements include charts (bar, pie, line, etc.) as well as non-chart elements such as text (annotations), filter (interactive dashboard filters), and variable (inline computed values like totals or averages).
List Dashboards
GET /api/dashboards?workspace_id={id}
Get Dashboard
GET /api/dashboards/:id
Returns the dashboard with all pages, charts, and configuration.
Check Slug Availability
GET /api/dashboards/check-slug?slug={slug}
Create Dashboard
POST /api/dashboards
| Field | Type | Required | Description |
|---|---|---|---|
dashboard_name |
string | Yes | Dashboard title |
dashboard_description |
string | No | Description |
dashboard_slug |
string | No | URL-friendly slug for sharing |
workspace_id |
integer | No | Workspace ID |
Update Dashboard
PUT /api/dashboards/:id
Delete Dashboard
DELETE /api/dashboards/:id
Pages
Dashboards contain multiple pages for organizing charts.
Create Page
POST /api/dashboards/:id/pages
| Field | Type | Description |
|---|---|---|
page_title |
string | Page title |
Update Page
PUT /api/dashboards/:id/pages/:pageId
Delete Page
DELETE /api/dashboards/:id/pages/:pageId
Reorder Pages
PUT /api/dashboards/:id/pages/reorder
Body: { "page_ids": [2, 1, 3] }
Elements (Charts, Text, Filter, Variable)
Dashboard pages hold "elements". Most elements are charts that visualize data; others are non-chart controls. The API uses the legacy charts route name for all element types.
Element Types
chart_type |
Description | Requires |
|---|---|---|
bar / horizontal-bar / stacked-bar |
Bar chart variants | dimension, aggregation |
line / area / line-bar |
Line-style charts | dimension, aggregation |
pie / donut |
Parts-of-whole charts | dimension, aggregation |
radar / gauge / kpi / table |
Other visualizations | dimension, aggregation |
text |
Markdown/plain-text block for section headers & notes | chart_config.text (no dimension) |
filter |
Interactive dropdown/multiselect that sets a global dashboard filter | chart_config.filterElement (question binding) |
variable |
Inline single value (base/count/sum/mean) rendered as label + number | dimension + chart_config.variable (metric) |
Create Element
POST /api/dashboards/:id/charts
| Field | Type | Description |
|---|---|---|
page_id |
integer | Page to add the element to |
chart_type |
string | Element type (see table above) |
chart_title |
string | Element title |
chart_config |
object | Element configuration. Shape depends on chart_type. |
Update Chart
PUT /api/dashboards/:id/charts/:chartId
Delete Chart
DELETE /api/dashboards/:id/charts/:chartId
Reorder Charts
PUT /api/dashboards/:id/charts/reorder
Chart Data
Get Chart Data
POST /api/dashboards/:id/chart-data
Computes and returns the data for a chart configuration.
| Field | Type | Description |
|---|---|---|
survey_id |
integer | Source survey |
question_id |
integer | Source question |
chart_type |
string | Visualization type |
filters |
object | Optional data filters |
Batch Chart Data
POST /api/dashboards/:id/chart-data-batch
Fetch data for multiple charts in a single request (recommended for dashboard loading).
| Field | Type | Description |
|---|---|---|
charts |
array | Array of chart config objects |
Sharing
List Shares
GET /api/dashboards/:id/shares
Create Share
POST /api/dashboards/:id/shares
| Field | Type | Description |
|---|---|---|
share_type |
string | public, password, user, group |
share_password |
string | Password for password-protected shares |
user_id |
integer | User ID for user shares |
group_id |
integer | Group ID for group shares |
Delete Share
DELETE /api/dashboards/:id/shares/:shareId
Public Dashboard Access
Public dashboards can be accessed without authentication:
GET /api/public/d/:orgSlug/:dashboardSlug
POST /api/public/d/:orgSlug/:dashboardSlug/chart-data
POST /api/public/d/:orgSlug/:dashboardSlug/chart-data-batch