diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index df325279eec0..3fb415579163 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -82741,7 +82741,12 @@ components: definition: $ref: "#/components/schemas/WidgetDefinition" is_favorited: - description: "Will be implemented soon. Currently always returns false." + description: |- + 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. example: false type: boolean modified_at: @@ -134588,7 +134593,17 @@ paths: - teams_read /api/v2/widgets/{experience_type}: get: - 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. + description: |- + 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. operationId: SearchWidgets parameters: - description: The experience type for the widget. @@ -134624,8 +134639,14 @@ paths: schema: type: string - description: |- - Sort field for the results. Prefix with `-` for descending order. - Allowed values: `title`, `created_at`, `modified_at`. + 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. in: query name: sort schema: diff --git a/lib/datadog_api_client/v2/api/widgets_api.rb b/lib/datadog_api_client/v2/api/widgets_api.rb index f049f04773fd..f5d8875ce94d 100644 --- a/lib/datadog_api_client/v2/api/widgets_api.rb +++ b/lib/datadog_api_client/v2/api/widgets_api.rb @@ -260,7 +260,16 @@ def search_widgets(experience_type, opts = {}) # Search widgets. # - # Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. + # 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. # # @param experience_type [WidgetExperienceType] The experience type for the widget. # @param opts [Hash] the optional parameters @@ -269,7 +278,7 @@ def search_widgets(experience_type, opts = {}) # @option opts [Boolean] :filter_is_favorited Filter to only widgets favorited by the current user. # @option opts [String] :filter_title Filter widgets by title (substring match). # @option opts [String] :filter_tags Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`. - # @option opts [String] :sort Sort field for the results. Prefix with `-` for descending order. Allowed values: `title`, `created_at`, `modified_at`. + # @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. # @option opts [Integer] :page_number Page number for pagination (0-indexed). # @option opts [Integer] :page_size Number of widgets per page. # @return [Array<(WidgetListResponse, Integer, Hash)>] WidgetListResponse data, response status code and response headers diff --git a/lib/datadog_api_client/v2/models/widget_attributes.rb b/lib/datadog_api_client/v2/models/widget_attributes.rb index af559edf326d..58b41cbfa721 100644 --- a/lib/datadog_api_client/v2/models/widget_attributes.rb +++ b/lib/datadog_api_client/v2/models/widget_attributes.rb @@ -27,7 +27,11 @@ class WidgetAttributes # The definition of a widget, including its type and configuration. attr_reader :definition - # Will be implemented soon. Currently always returns false. + # 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. attr_reader :is_favorited # ISO 8601 timestamp of when the widget was last modified.