V3 Dashboards
Add a chart to a dashboard
Changed onPuts an existing chart on a dashboard. Without a layout the chart lands in the first open slot at its chart type's default size; with one, exactly there. Widgets may leave gaps but not overlap: a layout covering another widget answers 422 naming it. A chart appears at most once per dashboard (409), and must live in the dashboard's workspace. A dashboard holds at most 250 widgets, and a new widget takes the first open slot: an add past the cap, or with no open slot above the grid's last row, answers 409. Moves the dashboard's updatedAt. Needs write access to the dashboard's workspace.
post/api/v3/dashboards/{dashboardId}/widgets
Request
- Base URLhttps://app.formbricks.com
- URLhttps://app.formbricks.com/api/v3/dashboards/{dashboardId}/widgets
- Auth
- API key in cookie next-auth.session-token
- or API key in header x-api-key
- or HTTP bearer
Path parameters
dashboardIdstring cuid2 required
Dashboard identifier.
Request body
Response
The new widget
Example response
{
"data": {
"chart": {
"query": {
"measures": [
"FeedbackRecords.npsScore"
],
"dimensions": [
"FeedbackRecords.sourceName"
],
"timeDimensions": [
{
"dimension": "FeedbackRecords.collectedAt",
"dateRange": "last 30 days"
}
],
"filters": [
{
"member": "FeedbackRecords.sourceType"
}
]
}
}
}
}Changes
- info
endpoint added
- info