Skip to content

Commit 2d6aec8

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

3 files changed

Lines changed: 41 additions & 7 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:

lib/datadog_api_client/v2/api/widgets_api.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,16 @@ def search_widgets(experience_type, opts = {})
260260

261261
# Search widgets.
262262
#
263-
# Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination.
263+
# Search and list widgets for a given experience type, with filtering, sorting, and pagination.
264+
#
265+
# **Response meta** carries totals scoped to the current filter:
266+
# - `filtered_total` — widgets matching the filter.
267+
# - `created_by_you_total` — among the matches, how many the current user created.
268+
# - `favorited_by_you_total` — among the matches, how many the current user has favorited.
269+
# - `created_by_anyone_total` — total widgets in the experience type, ignoring filters.
270+
#
271+
# Each returned widget includes `is_favorited` reflecting the current user's favorite status.
272+
# Favoriting itself is performed through the shared favorites API, not this endpoint.
264273
#
265274
# @param experience_type [WidgetExperienceType] The experience type for the widget.
266275
# @param opts [Hash] the optional parameters
@@ -269,7 +278,7 @@ def search_widgets(experience_type, opts = {})
269278
# @option opts [Boolean] :filter_is_favorited Filter to only widgets favorited by the current user.
270279
# @option opts [String] :filter_title Filter widgets by title (substring match).
271280
# @option opts [String] :filter_tags Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`.
272-
# @option opts [String] :sort Sort field for the results. Prefix with `-` for descending order. Allowed values: `title`, `created_at`, `modified_at`.
281+
# @option opts [String] :sort 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.
273282
# @option opts [Integer] :page_number Page number for pagination (0-indexed).
274283
# @option opts [Integer] :page_size Number of widgets per page.
275284
# @return [Array<(WidgetListResponse, Integer, Hash)>] WidgetListResponse data, response status code and response headers

lib/datadog_api_client/v2/models/widget_attributes.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ class WidgetAttributes
2727
# The definition of a widget, including its type and configuration.
2828
attr_reader :definition
2929

30-
# Will be implemented soon. Currently always returns false.
30+
# Whether the current user has favorited this widget. Populated on get,
31+
# batch_get, update, and search responses; create responses always return
32+
# `false` because a widget can only be favorited after it exists.
33+
# Favoriting itself is performed through the shared favorites API, not
34+
# this service.
3135
attr_reader :is_favorited
3236

3337
# ISO 8601 timestamp of when the widget was last modified.

0 commit comments

Comments
 (0)