Preview widget data without saving.
API Key Authentication. It should be included in the header of each request.
Serializer for Widget model.
Dashboard this widget belongs to
Optional name/title for the widget
255Filter conditions to scope the data. See the Dashboards guide for supported fields, operators, and syntax.
{
"field": "success",
"op": "eq",
"value": true
}{
"operator": "and",
"conditions": [
{
"field": "timestamp",
"op": "gte",
"value": "today-7d"
},
{
"field": "duration",
"op": "gte",
"value": 60
}
]
}Type of chart to display
line - Linebar - Barpie - Pieline, bar, pie Data type of the field being plotted (optional, can be inferred)
numeric - Numericboolean - Booleanstring - Stringdatetime - DateTimedynamic - Dynamicnumeric, boolean, string, datetime, dynamic, , null Field name to plot. See the Dashboards guide for available fields, valid chart types, and aggregation combinations.
255"duration"
"success"
"call_ended_reason"
"metric_evaluations.value"
"metadata.region"
Metric to use when field is 'metric_evaluations.value'
Time period for aggregation (for bar charts)
hour - Hourday - Dayweek - Weekmonth - Monthhour, day, week, month, , null Aggregation function to apply (for bar charts)
count - Countsum - Sumavg - Averagemin - Minimummax - Maximumcount, sum, avg, min, max, , null Frontend metadata (e.g., position, size, styling)
Serializer for widget data response.
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 for full 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
}
]Additional metadata about the plotted data. See the Dashboards guide for details.