Create Widget

Adds a widget configuration to a dashboard and returns the id of the created widget. Use the dashboard detail endpoint for its full configuration, or a query endpoint for computed widget data.

Path parameters

dashboardIdstringRequired
The id of the dashboard.

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Request

The widget configuration to add to the dashboard.
namestringRequired
The widget's name.
descriptionstring or nullOptional
An optional description of the widget.
typeenumOptional
The visualization type of a widget.
unitenumOptional
The unit a widget's values are measured in.
modeenumOptional

How a widget aggregates its lines. TIME_SERIES plots each configured line over time; DIMENSION_SERIES takes a single metric and splits it into one series per value of the widget’s dimension. This is the widget’s saved configuration — it does not by itself describe the shape of a query response (use kind on the query result for that).

bucketModeenumOptional

How a widget’s data is bucketed over the query time range. SERIES splits the range into one bucket per granularity interval (a time series); RANGE aggregates the whole range into a single bucket (one total, as used by BIG_NUMBER widgets). Defaults to SERIES when omitted.

dimensionenumOptional

The dimension a widget breaks down by when mode is DIMENSION_SERIES.

topKobjectOptional
Limits a dimension breakdown to the top K series.
startTimestring or nullOptionalformat: "date-time"
The start of the widget's custom time range, if set.
endTimestring or nullOptionalformat: "date-time"
The end of the widget's custom time range, if set.
layoutobjectOptional
A widget's position on the dashboard grid.
lineslist of objects or nullOptional
The series to show in the widget.

Response

The id of the created widget.
successboolean
Indicates if the request was successful.
dataobject
The id of the affected dashboard or widget.
deprecatedboolean
Indicates if this endpoint is deprecated.