Skip to content

Commit 3b484ea

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a6273f07 of spec repo
1 parent d3340dd commit 3b484ea

9 files changed

Lines changed: 198 additions & 11 deletions

File tree

.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-27 17:12:13.510503",
8-
"spec_repo_commit": "ed439f7c"
7+
"regenerated": "2025-06-02 13:31:07.597287",
8+
"spec_repo_commit": "a6273f07"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-27 17:12:13.526776",
13-
"spec_repo_commit": "ed439f7c"
12+
"regenerated": "2025-06-02 13:31:07.613907",
13+
"spec_repo_commit": "a6273f07"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15123,10 +15123,16 @@ components:
1512315123
FindingAttributes:
1512415124
description: The JSON:API attributes of the finding.
1512515125
properties:
15126+
datadog_link:
15127+
$ref: '#/components/schemas/FindingDatadogLink'
15128+
description:
15129+
$ref: '#/components/schemas/FindingDescription'
1512615130
evaluation:
1512715131
$ref: '#/components/schemas/FindingEvaluation'
1512815132
evaluation_changed_at:
1512915133
$ref: '#/components/schemas/FindingEvaluationChangedAt'
15134+
external_id:
15135+
$ref: '#/components/schemas/FindingExternalId'
1513015136
mute:
1513115137
$ref: '#/components/schemas/FindingMute'
1513215138
resource:
@@ -15144,6 +15150,22 @@ components:
1514415150
vulnerability_type:
1514515151
$ref: '#/components/schemas/FindingVulnerabilityType'
1514615152
type: object
15153+
FindingDatadogLink:
15154+
description: The Datadog relative link for this finding.
15155+
example: /security/compliance?panels=cpfinding%7Cevent%7CruleId%3Adef-000-u5t%7CresourceId%3Ae8c9ab7c52ebd7bf2fdb4db641082d7d%7CtabId%3Aoverview
15156+
type: string
15157+
FindingDescription:
15158+
description: The description and remediation steps for this finding.
15159+
example: '## Remediation
15160+
15161+
15162+
1. In the console, go to **Storage Account**.
15163+
15164+
2. For each Storage Account, navigate to **Data Protection**.
15165+
15166+
3. Select **Set soft delete enabled** and enter the number of days to retain
15167+
soft deleted data.'
15168+
type: string
1514715169
FindingEvaluation:
1514815170
description: The evaluation of the finding.
1514915171
enum:
@@ -15161,6 +15183,10 @@ components:
1516115183
format: int64
1516215184
minimum: 1
1516315185
type: integer
15186+
FindingExternalId:
15187+
description: The Cloud based Id for the resource related to the finding.
15188+
example: arn:aws:s3:::my-example-bucket
15189+
type: string
1516415190
FindingID:
1516515191
description: The unique ID for this finding.
1516615192
example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==
@@ -52695,13 +52721,19 @@ paths:
5269552721
the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.\n\nQuery
5269652722
parameters must be only among the documented ones and with values of correct
5269752723
types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`)
52698-
are not allowed.\n\n### Response\n\nThe response includes an array of finding
52699-
objects, pagination metadata, and a count of items that match the query.\n\nEach
52700-
finding object contains the following:\n\n- The finding ID that can be used
52701-
in a `GetFinding` request to retrieve the full finding details.\n- Core attributes,
52702-
including status, evaluation, high-level resource details, muted state, and
52703-
rule details.\n- `evaluation_changed_at` and `resource_discovery_date` time
52704-
stamps.\n- An array of associated tags.\n"
52724+
are not allowed.\n\n### Additional extension fields\n\nAdditional extension
52725+
fields are available for some findings.\n\nThe data is available when you
52726+
include the query parameter `?detailed_findings=true` in the request.\n\nThe
52727+
following fields are available for findings:\n- `external_id`: The resource
52728+
external ID related to the finding.\n- `description`: The description and
52729+
remediation steps for the finding.\n- `datadog_link`: The Datadog relative
52730+
link for the finding.\n\n### Response\n\nThe response includes an array of
52731+
finding objects, pagination metadata, and a count of items that match the
52732+
query.\n\nEach finding object contains the following:\n\n- The finding ID
52733+
that can be used in a `GetFinding` request to retrieve the full finding details.\n-
52734+
Core attributes, including status, evaluation, high-level resource details,
52735+
muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
52736+
time stamps.\n- An array of associated tags.\n"
5270552737
operationId: ListFindings
5270652738
parameters:
5270752739
- description: Limit the number of findings returned. Must be <= 1000.
@@ -52804,6 +52836,14 @@ paths:
5280452836
items:
5280552837
$ref: '#/components/schemas/FindingVulnerabilityType'
5280652838
type: array
52839+
- description: Return additional fields for some findings.
52840+
example:
52841+
- true
52842+
in: query
52843+
name: detailed_findings
52844+
required: false
52845+
schema:
52846+
type: boolean
5280752847
responses:
5280852848
'200':
5280952849
content:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-05-20T12:11:24.321Z"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"log": {
3+
"_recordingName": "Security Monitoring/List findings returns \"OK\" response with details",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "0b731c8b9bbe98674f8ad005c800b7d6",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 543,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "detailed_findings",
30+
"value": "true"
31+
}
32+
],
33+
"url": "https://api.datadoghq.com/api/v2/posture_management/findings?detailed_findings=true"
34+
},
35+
"response": {
36+
"bodySize": 89,
37+
"content": {
38+
"mimeType": "application/vnd.api+json",
39+
"size": 89,
40+
"text": "{\"data\":[],\"meta\":{\"page\":{\"total_filtered_count\":0},\"snapshot_timestamp\":1747743085077}}"
41+
},
42+
"cookies": [],
43+
"headers": [
44+
{
45+
"name": "content-type",
46+
"value": "application/vnd.api+json"
47+
}
48+
],
49+
"headersSize": 524,
50+
"httpVersion": "HTTP/1.1",
51+
"redirectURL": "",
52+
"status": 200,
53+
"statusText": "OK"
54+
},
55+
"startedDateTime": "2025-05-20T12:11:24.786Z",
56+
"time": 462
57+
}
58+
],
59+
"pages": [],
60+
"version": "1.2"
61+
}
62+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* List findings returns "OK" response with details
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listFindings"] = true;
9+
const apiInstance = new v2.SecurityMonitoringApi(configuration);
10+
11+
const params: v2.SecurityMonitoringApiListFindingsRequest = {
12+
detailedFindings: true,
13+
};
14+
15+
apiInstance
16+
.listFindings(params)
17+
.then((data: v2.ListFindingsResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3332,6 +3332,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
33323332
"type": "Array<FindingVulnerabilityType>",
33333333
"format": "",
33343334
},
3335+
"detailedFindings": {
3336+
"type": "boolean",
3337+
"format": "",
3338+
},
33353339
"operationResponseType": "ListFindingsResponse",
33363340
},
33373341
"v2.MuteFindings": {

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+
@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

packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
15321532
filterEvaluation?: FindingEvaluation,
15331533
filterStatus?: FindingStatus,
15341534
filterVulnerabilityType?: Array<FindingVulnerabilityType>,
1535+
detailedFindings?: boolean,
15351536
_options?: Configuration
15361537
): Promise<RequestContext> {
15371538
const _config = _options || this.configuration;
@@ -1647,6 +1648,13 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
16471648
"multi"
16481649
);
16491650
}
1651+
if (detailedFindings !== undefined) {
1652+
requestContext.setQueryParam(
1653+
"detailed_findings",
1654+
ObjectSerializer.serialize(detailedFindings, "boolean", ""),
1655+
""
1656+
);
1657+
}
16501658

16511659
// Apply auth methods
16521660
applySecurityAuthentication(_config, requestContext, [
@@ -7029,6 +7037,11 @@ export interface SecurityMonitoringApiListFindingsRequest {
70297037
* @type Array<FindingVulnerabilityType>
70307038
*/
70317039
filterVulnerabilityType?: Array<FindingVulnerabilityType>;
7040+
/**
7041+
* Return additional fields for some findings.
7042+
* @type boolean
7043+
*/
7044+
detailedFindings?: boolean;
70327045
}
70337046

70347047
export interface SecurityMonitoringApiListHistoricalJobsRequest {
@@ -8338,6 +8351,17 @@ export class SecurityMonitoringApi {
83388351
*
83398352
* 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.
83408353
*
8354+
* ### Additional extension fields
8355+
*
8356+
* Additional extension fields are available for some findings.
8357+
*
8358+
* The data is available when you include the query parameter `?detailed_findings=true` in the request.
8359+
*
8360+
* The following fields are available for findings:
8361+
* - `external_id`: The resource external ID related to the finding.
8362+
* - `description`: The description and remediation steps for the finding.
8363+
* - `datadog_link`: The Datadog relative link for the finding.
8364+
*
83418365
* ### Response
83428366
*
83438367
* The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
@@ -8368,6 +8392,7 @@ export class SecurityMonitoringApi {
83688392
param.filterEvaluation,
83698393
param.filterStatus,
83708394
param.filterVulnerabilityType,
8395+
param.detailedFindings,
83718396
options
83728397
);
83738398
return requestContextPromise.then((requestContext) => {
@@ -8406,6 +8431,7 @@ export class SecurityMonitoringApi {
84068431
param.filterEvaluation,
84078432
param.filterStatus,
84088433
param.filterVulnerabilityType,
8434+
param.detailedFindings,
84098435
options
84108436
);
84118437
const responseContext = await this.configuration.httpApi.send(

packages/datadog-api-client-v2/models/FindingAttributes.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1515
* The JSON:API attributes of the finding.
1616
*/
1717
export class FindingAttributes {
18+
/**
19+
* The Datadog relative link for this finding.
20+
*/
21+
"datadogLink"?: string;
22+
/**
23+
* The description and remediation steps for this finding.
24+
*/
25+
"description"?: string;
1826
/**
1927
* The evaluation of the finding.
2028
*/
@@ -23,6 +31,10 @@ export class FindingAttributes {
2331
* The date on which the evaluation for this finding changed (Unix ms).
2432
*/
2533
"evaluationChangedAt"?: number;
34+
/**
35+
* The Cloud based Id for the resource related to the finding.
36+
*/
37+
"externalId"?: string;
2638
/**
2739
* Information about the mute status of this finding.
2840
*/
@@ -72,6 +84,14 @@ export class FindingAttributes {
7284
* @ignore
7385
*/
7486
static readonly attributeTypeMap: AttributeTypeMap = {
87+
datadogLink: {
88+
baseName: "datadog_link",
89+
type: "string",
90+
},
91+
description: {
92+
baseName: "description",
93+
type: "string",
94+
},
7595
evaluation: {
7696
baseName: "evaluation",
7797
type: "FindingEvaluation",
@@ -81,6 +101,10 @@ export class FindingAttributes {
81101
type: "number",
82102
format: "int64",
83103
},
104+
externalId: {
105+
baseName: "external_id",
106+
type: "string",
107+
},
84108
mute: {
85109
baseName: "mute",
86110
type: "FindingMute",

0 commit comments

Comments
 (0)