From ddba5a7a730934e0c6c41f63b164e35987e70eac Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:24:03 +0000 Subject: [PATCH 1/2] Regenerate client from commit ef327a7 of spec repo (#3549) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 10 +++++++++- ...quest-Invalid-pagination-token-response.frozen | 2 +- ...-request-Invalid-pagination-token-response.yml | 7 +++---- .../List-assets-SBOMs-returns-OK-response.frozen | 2 +- .../List-assets-SBOMs-returns-OK-response.yml | 2 +- features/v2/security_monitoring.feature | 2 +- .../v2/api/security_monitoring_api.rb | 15 ++++++++++----- lib/datadog_api_client/v2/models/asset_type.rb | 1 + 8 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3661bf3fc2f3..03da13c5f2c5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -10502,6 +10502,7 @@ components: - Host - HostImage - Image + - ServerlessFunction example: Repository type: string x-enum-varnames: @@ -10510,6 +10511,7 @@ components: - HOST - HOSTIMAGE - IMAGE + - SERVERLESSFUNCTION AssetVersion: description: Asset version. properties: @@ -175616,6 +175618,11 @@ paths: description: |- Get a list of assets SBOMs for an organization. + The `filter[asset_type]` parameter is required for initial requests (when no `page[token]` is provided). + Subsequent pages encode the asset type in the pagination token, so `filter[asset_type]` is not required + for paginated requests. Mixing infrastructure asset types (`Host`, `HostImage`, `Image`, `ServerlessFunction`) + with code asset types (`Repository`, `Service`) in the same request is not supported and returns a 400 error. + ### Pagination Please review the [Pagination section](#pagination) for the "List Vulnerabilities" endpoint. @@ -175645,7 +175652,8 @@ paths: format: int64 minimum: 1 type: integer - - description: The type of the assets for the SBOM request. + - description: >- + The type of the assets for the SBOM request. Required for initial requests (when no `page[token]` is provided). Infrastructure types (`Host`, `HostImage`, `Image`, `ServerlessFunction`) and code types (`Repository`, `Service`) cannot be mixed in the same request. example: Repository in: query name: filter[asset_type] diff --git a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.frozen b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.frozen index 70b6759f5114..bc955ea3db36 100644 --- a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.frozen +++ b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.frozen @@ -1 +1 @@ -2026-07-06T19:25:16.964Z \ No newline at end of file +2026-07-07T14:35:06.517Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.yml b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.yml index 9d6ddbfd158a..db7bf4395700 100644 --- a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.yml +++ b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-Bad-request-Invalid-pagination-token-response.yml @@ -1,17 +1,16 @@ http_interactions: -- recorded_at: Mon, 06 Jul 2026 19:25:16 GMT +- recorded_at: Tue, 07 Jul 2026 14:35:06 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/security/sboms?page%5Btoken%5D=unknown&page%5Bnumber%5D=1 + uri: https://api.datadoghq.com/api/v2/security/sboms?page%5Btoken%5D=SERVICE%3Aunknown&page%5Bnumber%5D=1 response: body: encoding: UTF-8 - string: '{"errors":[{"status":"400","title":"Bad request: asset_type","detail":"asset_type - filter is required"}]}' + string: '{"errors":[{"status":"400","title":"Unexpected internal error"}]}' headers: Content-Type: - application/vnd.api+json diff --git a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.frozen index a502bb4f89af..982d9d76508e 100644 --- a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-20T08:27:19.760Z \ No newline at end of file +2026-07-07T14:35:10.638Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.yml index d026cfef8cc2..9e29e56d11d6 100644 --- a/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/List-assets-SBOMs-returns-OK-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Tue, 20 Jan 2026 08:27:19 GMT +- recorded_at: Tue, 07 Jul 2026 14:35:10 GMT request: body: null headers: diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index c204c1d587fc..3183e333cebf 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -2369,7 +2369,7 @@ Feature: Security Monitoring @team:DataDog/k9-cloud-vm Scenario: List assets SBOMs returns "Bad request: Invalid pagination token." response Given new "ListAssetsSBOMs" request - And request contains "page[token]" parameter with value "unknown" + And request contains "page[token]" parameter with value "SERVICE:unknown" And request contains "page[number]" parameter with value 1 When the request is sent Then the response status is 400 Bad request: Invalid pagination token. diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index 9751fcbb908b..0a1e0290ea7e 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -5050,7 +5050,7 @@ def get_sbom_with_http_info(asset_type, filter_asset_name, opts = {}) fail ArgumentError, "Missing the required parameter 'asset_type' when calling SecurityMonitoringAPI.get_sbom" end # verify enum value - allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image'] + allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image', 'ServerlessFunction'] if @api_client.config.client_side_validation && !allowable_values.include?(asset_type) fail ArgumentError, "invalid value for \"asset_type\", must be one of #{allowable_values}" end @@ -7227,6 +7227,11 @@ def list_assets_sbo_ms(opts = {}) # # Get a list of assets SBOMs for an organization. # + # The `filter[asset_type]` parameter is required for initial requests (when no `page[token]` is provided). + # Subsequent pages encode the asset type in the pagination token, so `filter[asset_type]` is not required + # for paginated requests. Mixing infrastructure asset types (`Host`, `HostImage`, `Image`, `ServerlessFunction`) + # with code asset types (`Repository`, `Service`) in the same request is not supported and returns a 400 error. + # # ### Pagination # # Please review the [Pagination section](#pagination) for the "List Vulnerabilities" endpoint. @@ -7242,7 +7247,7 @@ def list_assets_sbo_ms(opts = {}) # @param opts [Hash] the optional parameters # @option opts [String] :page_token Its value must come from the `links` section of the response of the first request. Do not manually edit it. # @option opts [Integer] :page_number The page number to be retrieved. It should be equal to or greater than 1. - # @option opts [AssetType] :filter_asset_type The type of the assets for the SBOM request. + # @option opts [AssetType] :filter_asset_type The type of the assets for the SBOM request. Required for initial requests (when no `page[token]` is provided). Infrastructure types (`Host`, `HostImage`, `Image`, `ServerlessFunction`) and code types (`Repository`, `Service`) cannot be mixed in the same request. # @option opts [String] :filter_asset_name The name of the asset for the SBOM request. # @option opts [String] :filter_package_name The name of the component that is a dependency of an asset. # @option opts [String] :filter_package_version The version of the component that is a dependency of an asset. @@ -7257,7 +7262,7 @@ def list_assets_sbo_ms_with_http_info(opts = {}) if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling SecurityMonitoringAPI.list_assets_sbo_ms, must be greater than or equal to 1.' end - allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image'] + allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image', 'ServerlessFunction'] if @api_client.config.client_side_validation && opts[:'filter_asset_type'] && !allowable_values.include?(opts[:'filter_asset_type']) fail ArgumentError, "invalid value for \"filter_asset_type\", must be one of #{allowable_values}" end @@ -9219,7 +9224,7 @@ def list_vulnerabilities_with_http_info(opts = {}) if @api_client.config.client_side_validation && opts[:'filter_ecosystem'] && !allowable_values.include?(opts[:'filter_ecosystem']) fail ArgumentError, "invalid value for \"filter_ecosystem\", must be one of #{allowable_values}" end - allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image'] + allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image', 'ServerlessFunction'] if @api_client.config.client_side_validation && opts[:'filter_asset_type'] && !allowable_values.include?(opts[:'filter_asset_type']) fail ArgumentError, "invalid value for \"filter_asset_type\", must be one of #{allowable_values}" end @@ -9364,7 +9369,7 @@ def list_vulnerable_assets_with_http_info(opts = {}) if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling SecurityMonitoringAPI.list_vulnerable_assets, must be greater than or equal to 1.' end - allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image'] + allowable_values = ['Repository', 'Service', 'Host', 'HostImage', 'Image', 'ServerlessFunction'] if @api_client.config.client_side_validation && opts[:'filter_type'] && !allowable_values.include?(opts[:'filter_type']) fail ArgumentError, "invalid value for \"filter_type\", must be one of #{allowable_values}" end diff --git a/lib/datadog_api_client/v2/models/asset_type.rb b/lib/datadog_api_client/v2/models/asset_type.rb index 09065ae487cc..89d443636b97 100644 --- a/lib/datadog_api_client/v2/models/asset_type.rb +++ b/lib/datadog_api_client/v2/models/asset_type.rb @@ -26,5 +26,6 @@ class AssetType HOST = "Host".freeze HOSTIMAGE = "HostImage".freeze IMAGE = "Image".freeze + SERVERLESSFUNCTION = "ServerlessFunction".freeze end end From bd59c55b4efb7d245ba69c6953da90f063971620 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 21:09:32 +0000 Subject: [PATCH 2/2] Regenerate client from commit 1d2c9ab of spec repo (#3554) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 32 ----------- ..._user_defined_field_attributes_response.rb | 55 +------------------ 2 files changed, 1 insertion(+), 86 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 03da13c5f2c5..46e00f97bb02 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -47115,11 +47115,6 @@ components: IncidentUserDefinedFieldAttributesResponse: description: Attributes of an incident user-defined field. properties: - attached_to: - description: The resource type this field is attached to. Always "incidents". - example: "incidents" - readOnly: true - type: string category: $ref: "#/components/schemas/IncidentUserDefinedFieldCategory" collected: @@ -47164,12 +47159,6 @@ components: example: "1.5" nullable: true type: string - prerequisite: - description: Reserved for future use. Always null. - example: - nullable: true - readOnly: true - type: string required: description: When true, users must fill out this field on incidents. example: false @@ -47179,12 +47168,6 @@ components: example: false readOnly: true type: boolean - table_id: - description: Reserved for internal use. Always 0. - example: 0 - format: int64 - readOnly: true - type: integer tag_key: description: For metric tag-type fields only, the metric tag key that powers the autocomplete options. example: @@ -47205,7 +47188,6 @@ components: nullable: true type: array required: - - attached_to - category - collected - created @@ -47216,10 +47198,8 @@ components: - modified - name - ordinal - - prerequisite - required - reserved - - table_id - tag_key - type - valid_values @@ -139523,7 +139503,6 @@ paths: value: data: - attributes: - attached_to: "incidents" category: "what_happened" collected: "active" created: "2026-03-18T08:40:04.437887Z" @@ -139534,10 +139513,8 @@ paths: modified: "2026-03-18T08:40:04.437887Z" name: "root_cause" ordinal: "1.1" - prerequisite: required: false reserved: false - table_id: 0 tag_key: type: 1 valid_values: @@ -139642,7 +139619,6 @@ paths: value: data: attributes: - attached_to: "incidents" category: collected: created: "2026-03-18T08:40:05.185406Z" @@ -139653,10 +139629,8 @@ paths: modified: "2026-03-18T08:40:05.185406Z" name: "root_cause" ordinal: "9" - prerequisite: required: false reserved: false - table_id: 0 tag_key: type: 3 valid_values: @@ -139773,7 +139747,6 @@ paths: value: data: attributes: - attached_to: "incidents" category: "what_happened" collected: "active" created: "2026-03-18T08:40:04.437887Z" @@ -139784,10 +139757,8 @@ paths: modified: "2026-03-18T08:40:04.437887Z" name: "root_cause" ordinal: "1.1" - prerequisite: required: false reserved: false - table_id: 0 tag_key: type: 1 valid_values: @@ -139883,7 +139854,6 @@ paths: value: data: attributes: - attached_to: "incidents" category: "what_happened" collected: created: "2026-03-18T08:39:49.913895Z" @@ -139894,10 +139864,8 @@ paths: modified: "2026-03-18T08:39:49.922909Z" name: "root_cause" ordinal: "8" - prerequisite: required: false reserved: false - table_id: 0 tag_key: type: 3 valid_values: diff --git a/lib/datadog_api_client/v2/models/incident_user_defined_field_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_user_defined_field_attributes_response.rb index 525f05b232b5..d7cac38d6edd 100644 --- a/lib/datadog_api_client/v2/models/incident_user_defined_field_attributes_response.rb +++ b/lib/datadog_api_client/v2/models/incident_user_defined_field_attributes_response.rb @@ -21,9 +21,6 @@ module DatadogAPIClient::V2 class IncidentUserDefinedFieldAttributesResponse include BaseGenericModel - # The resource type this field is attached to. Always "incidents". - attr_reader :attached_to - # The section in which the field appears: "what_happened" or "why_it_happened". When null, the field appears in the Attributes section. attr_accessor :category @@ -54,18 +51,12 @@ class IncidentUserDefinedFieldAttributesResponse # A decimal string representing the field's display order in the UI. attr_accessor :ordinal - # Reserved for future use. Always null. - attr_accessor :prerequisite - # When true, users must fill out this field on incidents. attr_reader :required # When true, this field is reserved for system use and cannot be deleted. attr_reader :reserved - # Reserved for internal use. Always 0. - attr_reader :table_id - # For metric tag-type fields only, the metric tag key that powers the autocomplete options. attr_accessor :tag_key @@ -81,7 +72,6 @@ class IncidentUserDefinedFieldAttributesResponse # @!visibility private def self.attribute_map { - :'attached_to' => :'attached_to', :'category' => :'category', :'collected' => :'collected', :'created' => :'created', @@ -92,10 +82,8 @@ def self.attribute_map :'modified' => :'modified', :'name' => :'name', :'ordinal' => :'ordinal', - :'prerequisite' => :'prerequisite', :'required' => :'required', :'reserved' => :'reserved', - :'table_id' => :'table_id', :'tag_key' => :'tag_key', :'type' => :'type', :'valid_values' => :'valid_values' @@ -106,7 +94,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attached_to' => :'String', :'category' => :'IncidentUserDefinedFieldCategory', :'collected' => :'IncidentUserDefinedFieldCollected', :'created' => :'Time', @@ -117,10 +104,8 @@ def self.openapi_types :'modified' => :'Time', :'name' => :'String', :'ordinal' => :'String', - :'prerequisite' => :'String', :'required' => :'Boolean', :'reserved' => :'Boolean', - :'table_id' => :'Integer', :'tag_key' => :'String', :'type' => :'Integer', :'valid_values' => :'Array' @@ -138,7 +123,6 @@ def self.openapi_nullable :'metadata', :'modified', :'ordinal', - :'prerequisite', :'tag_key', :'type', :'valid_values', @@ -163,10 +147,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attached_to') - self.attached_to = attributes[:'attached_to'] - end - if attributes.key?(:'category') self.category = attributes[:'category'] end @@ -207,10 +187,6 @@ def initialize(attributes = {}) self.ordinal = attributes[:'ordinal'] end - if attributes.key?(:'prerequisite') - self.prerequisite = attributes[:'prerequisite'] - end - if attributes.key?(:'required') self.required = attributes[:'required'] end @@ -219,10 +195,6 @@ def initialize(attributes = {}) self.reserved = attributes[:'reserved'] end - if attributes.key?(:'table_id') - self.table_id = attributes[:'table_id'] - end - if attributes.key?(:'tag_key') self.tag_key = attributes[:'tag_key'] end @@ -242,28 +214,16 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attached_to.nil? return false if @created.nil? return false if @display_name.nil? return false if @name.nil? return false if @required.nil? return false if @reserved.nil? - return false if @table_id.nil? return false if @type > 8 return false if @type < 1 true end - # Custom attribute writer method with validation - # @param attached_to [Object] Object to be assigned - # @!visibility private - def attached_to=(attached_to) - if attached_to.nil? - fail ArgumentError, 'invalid value for "attached_to", attached_to cannot be nil.' - end - @attached_to = attached_to - end - # Custom attribute writer method with validation # @param created [Object] Object to be assigned # @!visibility private @@ -314,16 +274,6 @@ def reserved=(reserved) @reserved = reserved end - # Custom attribute writer method with validation - # @param table_id [Object] Object to be assigned - # @!visibility private - def table_id=(table_id) - if table_id.nil? - fail ArgumentError, 'invalid value for "table_id", table_id cannot be nil.' - end - @table_id = table_id - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -363,7 +313,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attached_to == o.attached_to && category == o.category && collected == o.collected && created == o.created && @@ -374,10 +323,8 @@ def ==(o) modified == o.modified && name == o.name && ordinal == o.ordinal && - prerequisite == o.prerequisite && required == o.required && reserved == o.reserved && - table_id == o.table_id && tag_key == o.tag_key && type == o.type && valid_values == o.valid_values && @@ -388,7 +335,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attached_to, category, collected, created, default_value, deleted, display_name, metadata, modified, name, ordinal, prerequisite, required, reserved, table_id, tag_key, type, valid_values, additional_properties].hash + [category, collected, created, default_value, deleted, display_name, metadata, modified, name, ordinal, required, reserved, tag_key, type, valid_values, additional_properties].hash end end end