> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cekura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Widget Data

> Get plot data for a widget.



## OpenAPI

````yaml get /dashboards/widgets/{id}/data/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /dashboards/widgets/{id}/data/:
    get:
      tags:
        - dashboards
      summary: Get widget chart data
      description: >-
        Fetch the computed chart data for a saved widget.


        **Timestamp filter required:** a `gt` or `gte` filter on `timestamp`
        must be present — either set on the dashboard, the widget, or passed
        here as `filters`. Maximum range: 30 days. Without it the request
        returns a 400 error.


        **Override filters:** pass `filters` as a filter JSON object to
        temporarily replace the widget's own filters for this request. Example:
        `{"operator": "and", "conditions": [{"field": "timestamp", "op": "gte",
        "value": "now-7d"}, {"field": "timestamp", "op": "lte", "value":
        "now"}]}`


        **Response shape by chart type:**

        - `line` — `{data: [{id, timestamp, value}], metadata: {display_name,
        data_type, filter_value}}`

        - `bar` — `{data: [{time_interval, value, sample_count}], metadata:
        ...}`

        - `pie` — `{data: [{label, value, percentage}], metadata: ...}`

        - `stat` — `{data: {total_calls, success_rate, avg_duration,
        p95_latency}, metadata: ...}`
      operationId: dashboards-widgets-data-retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
        - in: query
          name: filters
          schema:
            type: object
          description: >-
            filter JSON object to override widget filters for this request. Must
            include a timestamp constraint. Example: `{"operator": "and",
            "conditions": [{"field": "timestamp", "op": "gte", "value":
            "now-7d"}]}`
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetDataResponse'
          description: ''
      security:
        - api_key: []
components:
  schemas:
    WidgetDataResponse:
      type: object
      properties:
        widget_id:
          type: integer
        field_name:
          type: string
        chart_type:
          type: string
        data:
          type: array
          description: >-
            Chart data. Format depends on `chart_type`:


            **Line chart:** `[{id, timestamp, value}, ...]`


            **Bar chart:** `[{time_interval, value, sample_count}, ...]`


            **Pie chart:** `[{label, value, percentage}, ...]`


            See the [Dashboards
            guide](https://docs.cekura.ai/documentation/guides/dashboards#chart-output-formats)
            for full examples.
          items:
            type: object
          examples:
            - - id: 1
                timestamp: '2025-11-03T10:30:00Z'
                value: 45
              - id: 2
                timestamp: '2025-11-03T11:15:00Z'
                value: 62
            - - time_interval: '2025-11-03T00:00:00Z'
                value: 4.5
                sample_count: 10
              - time_interval: '2025-11-04T00:00:00Z'
                value: 3.2
                sample_count: 8
            - - label: customer_ended_call
                value: 320
                percentage: 45.7
              - label: agent_ended_call
                value: 210
                percentage: 30
        aggregation_function:
          type:
            - string
            - 'null'
        time_period:
          type:
            - string
            - 'null'
        group_by:
          oneOf:
            - {}
            - type: 'null'
        can_group_by:
          type: boolean
          default: false
        metadata:
          type: object
          description: >-
            Additional metadata about the plotted data. See the [Dashboards
            guide](https://docs.cekura.ai/documentation/guides/dashboards#widget-data)
            for details.
          properties:
            display_name:
              type: string
              description: Human-readable name of the field
            data_type:
              type: string
              enum:
                - numeric
                - boolean
                - string
                - datetime
                - dynamic
              description: Resolved data type of the field
            filter_value:
              description: The filter value used (e.g. metric ID), or null
              nullable: true
      required:
        - aggregation_function
        - chart_type
        - data
        - field_name
        - group_by
        - metadata
        - time_period
        - widget_id
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````