V3 Charts

Get a chart's data

Changed on

Runs 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.

get/api/v3/charts/{chartId}/data

Request

  • Base URL
    https://app.formbricks.com
  • URL
    https://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

chartIdstring cuid2 required

Chart identifier.

Query parameters

dateRangestring

A date preset from the field catalog's datePresets, or all-time. Not together with from/to.

fromstring date

First day of a custom range (inclusive). Requires to.

tostring date

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