Skip to content

Commit 3565e1b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3201485d of spec repo
1 parent d78f4b1 commit 3565e1b

File tree

7 files changed

+97
-12
lines changed

7 files changed

+97
-12
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-05-19 17:45:09.241591",
8-
"spec_repo_commit": "77e5efb9"
7+
"regenerated": "2025-05-20 09:17:41.965029",
8+
"spec_repo_commit": "3201485d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-19 17:45:09.257657",
13-
"spec_repo_commit": "77e5efb9"
12+
"regenerated": "2025-05-20 09:17:41.984078",
13+
"spec_repo_commit": "3201485d"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14944,6 +14944,10 @@ components:
1494414944
FindingAttributes:
1494514945
description: The JSON:API attributes of the finding.
1494614946
properties:
14947+
datadog_link:
14948+
$ref: '#/components/schemas/FindingDatadogLink'
14949+
description:
14950+
$ref: '#/components/schemas/FindingDescription'
1494714951
evaluation:
1494814952
$ref: '#/components/schemas/FindingEvaluation'
1494914953
evaluation_changed_at:
@@ -14965,6 +14969,22 @@ components:
1496514969
vulnerability_type:
1496614970
$ref: '#/components/schemas/FindingVulnerabilityType'
1496714971
type: object
14972+
FindingDatadogLink:
14973+
description: The Datadog relative link for this finding.
14974+
example: /security/compliance?panels=cpfinding%7Cevent%7CruleId%3Adef-000-u5t%7CresourceId%3Ae8c9ab7c52ebd7bf2fdb4db641082d7d%7CtabId%3Aoverview
14975+
type: string
14976+
FindingDescription:
14977+
description: The description and remediation steps for this finding.
14978+
example: '## Remediation
14979+
14980+
14981+
1. In the console, go to **Storage Account**.
14982+
14983+
2. For each Storage Account, navigate to **Data Protection**.
14984+
14985+
3. Select **Set soft delete enabled** and enter the number of days to retain
14986+
soft deleted data.'
14987+
type: string
1496814988
FindingEvaluation:
1496914989
description: The evaluation of the finding.
1497014990
enum:
@@ -52046,13 +52066,18 @@ paths:
5204652066
the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.\n\nQuery
5204752067
parameters must be only among the documented ones and with values of correct
5204852068
types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`)
52049-
are not allowed.\n\n### Response\n\nThe response includes an array of finding
52050-
objects, pagination metadata, and a count of items that match the query.\n\nEach
52051-
finding object contains the following:\n\n- The finding ID that can be used
52052-
in a `GetFinding` request to retrieve the full finding details.\n- Core attributes,
52053-
including status, evaluation, high-level resource details, muted state, and
52054-
rule details.\n- `evaluation_changed_at` and `resource_discovery_date` time
52055-
stamps.\n- An array of associated tags.\n"
52069+
are not allowed.\n\n### Additional extension fields\n\nAdditional extension
52070+
fields are available for some findings.\n\nThe data is available when you
52071+
include the query parameter `?detailed_findings=true` in the request.\n\nThe
52072+
following fields are available for findings:\n- `description`: The description
52073+
and remediation steps for the finding.\n- `datadog_link`: The Datadog relative
52074+
link for the finding.\n\n### Response\n\nThe response includes an array of
52075+
finding objects, pagination metadata, and a count of items that match the
52076+
query.\n\nEach finding object contains the following:\n\n- The finding ID
52077+
that can be used in a `GetFinding` request to retrieve the full finding details.\n-
52078+
Core attributes, including status, evaluation, high-level resource details,
52079+
muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
52080+
time stamps.\n- An array of associated tags.\n"
5205652081
operationId: ListFindings
5205752082
parameters:
5205852083
- description: Limit the number of findings returned. Must be <= 1000.
@@ -52155,6 +52180,14 @@ paths:
5215552180
items:
5215652181
$ref: '#/components/schemas/FindingVulnerabilityType'
5215752182
type: array
52183+
- description: Return additional fields for some findings.
52184+
example:
52185+
- true
52186+
in: query
52187+
name: detailed_findings
52188+
required: false
52189+
schema:
52190+
type: boolean
5215852191
responses:
5215952192
'200':
5216052193
content:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# List findings returns "OK" response with details
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_findings".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
8+
opts = {
9+
detailed_findings: true,
10+
}
11+
p api_instance.list_findings(opts)

features/scenarios_model_mapping.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@
11671167
"filter_evaluation" => "FindingEvaluation",
11681168
"filter_status" => "FindingStatus",
11691169
"filter_vulnerability_type" => "Array<FindingVulnerabilityType>",
1170+
"detailed_findings" => "Boolean",
11701171
},
11711172
"v2.MuteFindings" => {
11721173
"body" => "BulkMuteFindingsRequest",

features/v2/security_monitoring.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,14 @@ Feature: Security Monitoring
840840
Then the response status is 200 OK
841841
And the response "data[0].type" is equal to "finding"
842842

843+
@replay-only @team:DataDog/cloud-security-posture-management
844+
Scenario: List findings returns "OK" response with details
845+
Given operation "ListFindings" enabled
846+
And new "ListFindings" request
847+
And request contains "detailed_findings" parameter with value true
848+
When the request is sent
849+
Then the response status is 200 OK
850+
843851
@generated @skip @team:DataDog/cloud-security-posture-management @with-pagination
844852
Scenario: List findings returns "OK" response with pagination
845853
Given operation "ListFindings" enabled

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,16 @@ def list_findings(opts = {})
23102310
#
23112311
# Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed.
23122312
#
2313+
# ### Additional extension fields
2314+
#
2315+
# Additional extension fields are available for some findings.
2316+
#
2317+
# The data is available when you include the query parameter `?detailed_findings=true` in the request.
2318+
#
2319+
# The following fields are available for findings:
2320+
# - `description`: The description and remediation steps for the finding.
2321+
# - `datadog_link`: The Datadog relative link for the finding.
2322+
#
23132323
# ### Response
23142324
#
23152325
# The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
@@ -2336,6 +2346,7 @@ def list_findings(opts = {})
23362346
# @option opts [FindingEvaluation] :filter_evaluation Return only `pass` or `fail` findings.
23372347
# @option opts [FindingStatus] :filter_status Return only findings with the specified status.
23382348
# @option opts [Array<FindingVulnerabilityType>] :filter_vulnerability_type Return findings that match the selected vulnerability types (repeatable).
2349+
# @option opts [Boolean] :detailed_findings Return additional fields for some findings.
23392350
# @return [Array<(ListFindingsResponse, Integer, Hash)>] ListFindingsResponse data, response status code and response headers
23402351
def list_findings_with_http_info(opts = {})
23412352
unstable_enabled = @api_client.config.unstable_operations["v2.list_findings".to_sym]
@@ -2383,6 +2394,7 @@ def list_findings_with_http_info(opts = {})
23832394
query_params[:'filter[evaluation]'] = opts[:'filter_evaluation'] if !opts[:'filter_evaluation'].nil?
23842395
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
23852396
query_params[:'filter[vulnerability_type]'] = @api_client.build_collection_param(opts[:'filter_vulnerability_type'], :multi) if !opts[:'filter_vulnerability_type'].nil?
2397+
query_params[:'detailed_findings'] = opts[:'detailed_findings'] if !opts[:'detailed_findings'].nil?
23862398

23872399
# header parameters
23882400
header_params = opts[:header_params] || {}

lib/datadog_api_client/v2/models/finding_attributes.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ module DatadogAPIClient::V2
2121
class FindingAttributes
2222
include BaseGenericModel
2323

24+
# The Datadog relative link for this finding.
25+
attr_accessor :datadog_link
26+
27+
# The description and remediation steps for this finding.
28+
attr_accessor :description
29+
2430
# The evaluation of the finding.
2531
attr_accessor :evaluation
2632

@@ -57,6 +63,8 @@ class FindingAttributes
5763
# @!visibility private
5864
def self.attribute_map
5965
{
66+
:'datadog_link' => :'datadog_link',
67+
:'description' => :'description',
6068
:'evaluation' => :'evaluation',
6169
:'evaluation_changed_at' => :'evaluation_changed_at',
6270
:'mute' => :'mute',
@@ -74,6 +82,8 @@ def self.attribute_map
7482
# @!visibility private
7583
def self.openapi_types
7684
{
85+
:'datadog_link' => :'String',
86+
:'description' => :'String',
7787
:'evaluation' => :'FindingEvaluation',
7888
:'evaluation_changed_at' => :'Integer',
7989
:'mute' => :'FindingMute',
@@ -105,6 +115,14 @@ def initialize(attributes = {})
105115
end
106116
}
107117

118+
if attributes.key?(:'datadog_link')
119+
self.datadog_link = attributes[:'datadog_link']
120+
end
121+
122+
if attributes.key?(:'description')
123+
self.description = attributes[:'description']
124+
end
125+
108126
if attributes.key?(:'evaluation')
109127
self.evaluation = attributes[:'evaluation']
110128
end
@@ -203,6 +221,8 @@ def to_hash
203221
def ==(o)
204222
return true if self.equal?(o)
205223
self.class == o.class &&
224+
datadog_link == o.datadog_link &&
225+
description == o.description &&
206226
evaluation == o.evaluation &&
207227
evaluation_changed_at == o.evaluation_changed_at &&
208228
mute == o.mute &&
@@ -220,7 +240,7 @@ def ==(o)
220240
# @return [Integer] Hash code
221241
# @!visibility private
222242
def hash
223-
[evaluation, evaluation_changed_at, mute, resource, resource_discovery_date, resource_type, rule, status, tags, vulnerability_type, additional_properties].hash
243+
[datadog_link, description, evaluation, evaluation_changed_at, mute, resource, resource_discovery_date, resource_type, rule, status, tags, vulnerability_type, additional_properties].hash
224244
end
225245
end
226246
end

0 commit comments

Comments
 (0)