Get a chart's data
Changed onRuns a saved chart and returns its rows — the endpoint every dashboard widget loads its data from. A date range given here replaces the chart's own range on FeedbackRecords.collectedAt, exactly as a dashboard's date filter does, so the numbers match what a person sees on a dashboard filtered the same way. dateRange=all-time removes the range; without a date range the chart's saved range applies. Every range is read in the organization's display time zone; a timezone parameter is refused with 400. For a chart grouped by time alone, a requested range that spans more than 10,000 buckets of its granularity answers 422 limit_exceeded on dateRange: request a shorter range, or use a chart with a coarser granularity.
Needs read access to the chart's workspace and to its Feedback Dataset. Counts against the chart-query budget (600 per minute, 20 at once, per user or API key), not the v3 default.
Request
- Base URLhttps://app.formbricks.com
- URLhttps://app.formbricks.com/api/v3/charts/{chartId}/data
- Auth
- API key in cookie next-auth.session-token
- or API key in header x-api-key
- or HTTP bearer
Path parameters
Chart identifier.
Query parameters
A date preset from the field catalog's datePresets, or all-time. Not together with from/to.
First day of a custom range (inclusive). Requires to.
Last day of a custom range (inclusive). Requires from.
Response
The chart's rows
Example response
{
"data": {
"rows": [
{
"FeedbackRecords.sourceName": "Web",
"FeedbackRecords.count": 42
}
]
}
}Changes
- info
endpoint added
- info