Skip to content

Commit e54e5a2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 7e41715 of spec repo (#4036)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 85431be commit e54e5a2

3 files changed

Lines changed: 40 additions & 6 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82785,7 +82785,12 @@ components:
8278582785
definition:
8278682786
$ref: "#/components/schemas/WidgetDefinition"
8278782787
is_favorited:
82788-
description: "Will be implemented soon. Currently always returns false."
82788+
description: |-
82789+
Whether the current user has favorited this widget. Populated on get,
82790+
batch_get, update, and search responses; create responses always return
82791+
`false` because a widget can only be favorited after it exists.
82792+
Favoriting itself is performed through the shared favorites API, not
82793+
this service.
8278982794
example: false
8279082795
type: boolean
8279182796
modified_at:
@@ -144482,7 +144487,17 @@ paths:
144482144487
- teams_read
144483144488
/api/v2/widgets/{experience_type}:
144484144489
get:
144485-
description: Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination.
144490+
description: |-
144491+
Search and list widgets for a given experience type, with filtering, sorting, and pagination.
144492+
144493+
**Response meta** carries totals scoped to the current filter:
144494+
- `filtered_total` — widgets matching the filter.
144495+
- `created_by_you_total` — among the matches, how many the current user created.
144496+
- `favorited_by_you_total` — among the matches, how many the current user has favorited.
144497+
- `created_by_anyone_total` — total widgets in the experience type, ignoring filters.
144498+
144499+
Each returned widget includes `is_favorited` reflecting the current user's favorite status.
144500+
Favoriting itself is performed through the shared favorites API, not this endpoint.
144486144501
operationId: SearchWidgets
144487144502
parameters:
144488144503
- description: The experience type for the widget.
@@ -144518,8 +144533,14 @@ paths:
144518144533
schema:
144519144534
type: string
144520144535
- description: |-
144521-
Sort field for the results. Prefix with `-` for descending order.
144522-
Allowed values: `title`, `created_at`, `modified_at`.
144536+
Sort field for the results.
144537+
144538+
**`title`, `created_at`, `modified_at`** — both ascending and descending are
144539+
supported. Use the bare field name for ascending (e.g. `sort=title`) or prefix
144540+
with `-` for descending (e.g. `sort=-modified_at`).
144541+
144542+
**`is_favorited`** — returns favorites-first ordering (favorited widgets first,
144543+
then the rest). Direction is fixed; the `-` prefix is ignored for this field.
144523144544
in: query
144524144545
name: sort
144525144546
schema:

api/datadogV2/api_widgets.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,16 @@ func (r *SearchWidgetsOptionalParameters) WithPageSize(pageSize int32) *SearchWi
312312
}
313313

314314
// SearchWidgets Search widgets.
315-
// Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination.
315+
// Search and list widgets for a given experience type, with filtering, sorting, and pagination.
316+
//
317+
// **Response meta** carries totals scoped to the current filter:
318+
// - `filtered_total` — widgets matching the filter.
319+
// - `created_by_you_total` — among the matches, how many the current user created.
320+
// - `favorited_by_you_total` — among the matches, how many the current user has favorited.
321+
// - `created_by_anyone_total` — total widgets in the experience type, ignoring filters.
322+
//
323+
// Each returned widget includes `is_favorited` reflecting the current user's favorite status.
324+
// Favoriting itself is performed through the shared favorites API, not this endpoint.
316325
func (a *WidgetsApi) SearchWidgets(ctx _context.Context, experienceType WidgetExperienceType, o ...SearchWidgetsOptionalParameters) (WidgetListResponse, *_nethttp.Response, error) {
317326
var (
318327
localVarHTTPMethod = _nethttp.MethodGet

api/datadogV2/model_widget_attributes.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ type WidgetAttributes struct {
1616
CreatedAt string `json:"created_at"`
1717
// The definition of a widget, including its type and configuration.
1818
Definition WidgetDefinition `json:"definition"`
19-
// Will be implemented soon. Currently always returns false.
19+
// Whether the current user has favorited this widget. Populated on get,
20+
// batch_get, update, and search responses; create responses always return
21+
// `false` because a widget can only be favorited after it exists.
22+
// Favoriting itself is performed through the shared favorites API, not
23+
// this service.
2024
IsFavorited bool `json:"is_favorited"`
2125
// ISO 8601 timestamp of when the widget was last modified.
2226
ModifiedAt string `json:"modified_at"`

0 commit comments

Comments
 (0)