dashboards

Create a dashboard widget

Changed on

Create a dashboard widget

post/dashboards/widgets/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/dashboards/widgets/
  • 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

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

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 response

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

Changes