Search and list widgets for a given experience type, with filtering, sorting, and pagination.
Response meta carries totals scoped to the current filter:
filtered_total — widgets matching the filter.
created_by_you_total — among the matches, how many the current user created.
favorited_by_you_total — among the matches, how many the current user has favorited.
created_by_anyone_total — total widgets in the experience type, ignoring filters.
Each returned widget includes is_favorited reflecting the current user’s favorite status.
Favoriting itself is performed through the shared favorites API, not this endpoint.
This endpoint requires
any
of the following permissions:
Filter widgets by the email handle of the creator.
filter[isFavorited]
boolean
Filter to only widgets favorited by the current user.
filter[title]
string
Filter widgets by title (substring match).
filter[tags]
string
Filter widgets by tags. Format as bracket-delimited CSV, e.g. [tag1,tag2].
sort
string
Sort field for the results.
title, created_at, modified_at — both ascending and descending are
supported. Use the bare field name for ascending (e.g. sort=title) or prefix
with - for descending (e.g. sort=-modified_at).
is_favorited — returns favorites-first ordering (favorited widgets first,
then the rest). Direction is fixed; the - prefix is ignored for this field.
ISO 8601 timestamp of when the widget was created.
definition [required]
object
The definition of a widget, including its type and configuration.
title [required]
string
The display title of the widget.
type [required]
enum
Widget types that are allowed to be stored as individual records.
This is not a complete list of dashboard and notebook widget types.
Allowed enum values: bar_chart,change,cloud_cost_summary,cohort,funnel,geomap,list_stream,query_table,query_value,retention_curveShow 5 more,sankey,sunburst,timeseries,toplist,treemap
is_favorited [required]
boolean
Whether the current user has favorited this widget. Populated on get,
batch_get, update, and search responses; create responses always return
false because a widget can only be favorited after it exists.
Favoriting itself is performed through the shared favorites API, not
this service.
modified_at [required]
string
ISO 8601 timestamp of when the widget was last modified.
tags [required]
[string]
User-defined tags for organizing widgets.
id [required]
string
The unique identifier of the widget.
relationships
object
Relationships of the widget resource.
created_by
object
The user who created the widget.
data
object
Relationship data referencing a user resource.
id [required]
string
The unique identifier of the user.
type [required]
string
Users resource type.
modified_by
object
The user who last modified the widget.
data
object
Relationship data referencing a user resource.
id [required]
string
The unique identifier of the user.
type [required]
string
Users resource type.
type [required]
string
Widgets resource type.
included
[object]
Array of user resources related to the widgets.
attributes
object
Attributes of an included user resource.
handle
string
The email handle of the user.
name
string
The display name of the user.
id [required]
string
The unique identifier of the user.
type [required]
string
Users resource type.
meta
object
Metadata about the search results.
created_by_anyone_total
int64
Total number of widgets created by anyone.
created_by_you_total
int64
Total number of widgets created by the current user.
favorited_by_you_total
int64
Total number of widgets favorited by the current user.
filtered_total
int64
Total number of widgets matching the current filter criteria.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Search widgets returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.WidgetsApi(configuration);constparams: v2.WidgetsApiSearchWidgetsRequest={experienceType:"ccm_reports",};apiInstance.searchWidgets(params).then((data: v2.WidgetListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));