Widgets
Create Widget
Create a widget with its metrics; optionally link it to a dashboard in the same call.
post/v1/widgets
Headers
X-API-Keystring required
API key required to authenticate requests.
Request body
namestring required
descriptionstring nullable
chart_type'line' | 'bar' | 'pie' | 'table' | 'kpi' | 'pivot_table' | 'histogram' required
chart_mode'time_series' | 'categorical' nullable
data_type'observability' | 'simulation'
bar_mode'stacked' | 'side_by_side' nullable
aggregationstring[]
time_bucket'hour' | 'day' | 'week' | 'month' nullable
simulation_idsinteger[]
Required (non-empty) when group_by='simulation'
show_indeterminateboolean
column_visibilityobject nullable
color_overridesobject nullable
Per-series/per-slice colours as {"<label the chart draws>": "#rrggbb"}. Labels are matched case-insensitively; omitted labels keep the default palette.
show_legendboolean
Draw the colour key under the chart (pie, bar and line)
dashboard_idstring nullable
If provided, the widget is also linked to this dashboard
Response
Successful Response
idstring required
organization_idstring nullable
namestring required
descriptionstring nullable
chart_typestring required
chart_modestring nullable
data_typestring required
applies_to_all_agentsboolean
bar_modestring nullable
aggregationstring[] nullable
time_bucketstring nullable
group_bystring nullable
simulation_idsinteger[] nullable
show_indeterminateboolean nullable
{"stackTrail":"components:schemas:WidgetModel:properties:filters:anyOf","oasType":"schema","type":"unknown","title":"Filters","description":"Extra conversation filters applied on top of the dashboard scope","nullable":true}
{"stackTrail":"components:schemas:WidgetModel:properties:column_visibility:anyOf","oasType":"schema","type":"unknown","title":"Column Visibility","description":"Table (observability) widgets only: column visibility map","nullable":true}
color_overridesobject nullable
The colour the chart draws each series or slice in, keyed by its label lowercased. Written whole when a widget is saved, so it names every label rather than only the ones a person changed.
show_legendboolean
Whether the chart draws its colour key
created_bystring nullable
created_atstring nullable
updated_atstring nullable