dashboards

Preview widget data

Changed on

Preview widget data without saving.

post/dashboards/widgets/preview_data/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/dashboards/widgets/preview_data/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer
    • or API key in header X-VOCERA-SHAREABLE-LINK-TOKEN
    • or HTTP bearer

Query parameters

timezonestring

IANA timezone name, e.g. America/Chicago. Day, week and month buckets and today filters use this timezone. Defaults to UTC when omitted or not recognized.

Request body

idinteger
dashboardinteger nullable

Dashboard this widget belongs to

namestring nullable

Optional name/title for the widget

chart_type'line' | 'bar' | 'pie' | 'stat' required

Type of chart to display

  • line - Line
  • bar - Bar
  • pie - Pie
  • stat - Stat
data_type'numeric' | 'boolean' | 'string' | 'datetime' | 'dynamic' | '' | 'null' nullable

Data type of the field being plotted (optional, can be inferred)

  • numeric - Numeric
  • boolean - Boolean
  • string - String
  • datetime - DateTime
  • dynamic - Dynamic
fieldstring

Field name to plot. See the Dashboards guide for available fields, valid chart types, and aggregation combinations.

metricinteger nullable

Metric to use when field is 'metric_evaluations.value'

metric_namestring

Name of the metric (if metric is set)

time_period'hour' | 'day' | 'week' | 'month' | '' | 'null' nullable

Time period for aggregation (for bar charts)

  • hour - Hour
  • day - Day
  • week - Week
  • month - Month
aggregation_function'count' | 'sum' | 'avg' | 'min' | 'max' | 'p50' | 'p95' | 'p99' | '' | 'null' nullable

Aggregation function to apply (for bar charts)

  • count - Count
  • sum - Sum
  • avg - Average
  • min - Minimum
  • max - Maximum
  • p50 - 50th Percentile (Median)
  • p95 - 95th Percentile
  • p99 - 99th Percentile
group_byunknown
metadataunknown
created_atstring date-time nullable

When the widget was created

updated_atstring date-time nullable

When the widget was last updated

Example request

{
  "filters": {
    "field": "success",
    "op": "eq",
    "value": true
  },
  "effective_filters": {
    "field": "success",
    "op": "eq",
    "value": true
  },
  "field": "duration"
}

Response

widget_idinteger required
field_namestring required
chart_typestring required
dataobject[] required

Chart data. Format depends on chart_type:

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

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

Enum daily share: [{time_interval, group, value, selected_calls, total_calls, evaluated_calls}, ...], where value is the selected enum value's percentage of total filtered calls.

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

See the Dashboards guide for full examples.

aggregation_functionstring nullable required
time_periodstring nullable required
group_byunknown required
can_group_byboolean

Example response

{
  "data": [
    {
      "id": 1,
      "timestamp": "2025-11-03T10:30:00Z",
      "value": 45
    },
    {
      "id": 2,
      "timestamp": "2025-11-03T11:15:00Z",
      "value": 62
    }
  ]
}

Changes