Skip to content

Commit 9fdaccf

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3e3bf46c of spec repo
1 parent 2231833 commit 9fdaccf

9 files changed

Lines changed: 182 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-19 17:45:10.578805",
8-
"spec_repo_commit": "77e5efb9"
7+
"regenerated": "2025-05-20 12:22:26.153459",
8+
"spec_repo_commit": "3e3bf46c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-19 17:45:10.595057",
13-
"spec_repo_commit": "77e5efb9"
12+
"regenerated": "2025-05-20 12:22:26.170523",
13+
"spec_repo_commit": "3e3bf46c"
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: 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
@@ -3283,6 +3283,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
32833283
"type": "Array<FindingVulnerabilityType>",
32843284
"format": "",
32853285
},
3286+
"detailedFindings": {
3287+
"type": "boolean",
3288+
"format": "",
3289+
},
32863290
"operationResponseType": "ListFindingsResponse",
32873291
},
32883292
"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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
14781478
filterEvaluation?: FindingEvaluation,
14791479
filterStatus?: FindingStatus,
14801480
filterVulnerabilityType?: Array<FindingVulnerabilityType>,
1481+
detailedFindings?: boolean,
14811482
_options?: Configuration
14821483
): Promise<RequestContext> {
14831484
const _config = _options || this.configuration;
@@ -1593,6 +1594,13 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
15931594
"multi"
15941595
);
15951596
}
1597+
if (detailedFindings !== undefined) {
1598+
requestContext.setQueryParam(
1599+
"detailed_findings",
1600+
ObjectSerializer.serialize(detailedFindings, "boolean", ""),
1601+
""
1602+
);
1603+
}
15961604

15971605
// Apply auth methods
15981606
applySecurityAuthentication(_config, requestContext, [
@@ -6783,6 +6791,11 @@ export interface SecurityMonitoringApiListFindingsRequest {
67836791
* @type Array<FindingVulnerabilityType>
67846792
*/
67856793
filterVulnerabilityType?: Array<FindingVulnerabilityType>;
6794+
/**
6795+
* Return additional fields for some findings.
6796+
* @type boolean
6797+
*/
6798+
detailedFindings?: boolean;
67866799
}
67876800

67886801
export interface SecurityMonitoringApiListHistoricalJobsRequest {
@@ -8059,6 +8072,16 @@ export class SecurityMonitoringApi {
80598072
*
80608073
* 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.
80618074
*
8075+
* ### Additional extension fields
8076+
*
8077+
* Additional extension fields are available for some findings.
8078+
*
8079+
* The data is available when you include the query parameter `?detailed_findings=true` in the request.
8080+
*
8081+
* The following fields are available for findings:
8082+
* - `description`: The description and remediation steps for the finding.
8083+
* - `datadog_link`: The Datadog relative link for the finding.
8084+
*
80628085
* ### Response
80638086
*
80648087
* The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
@@ -8089,6 +8112,7 @@ export class SecurityMonitoringApi {
80898112
param.filterEvaluation,
80908113
param.filterStatus,
80918114
param.filterVulnerabilityType,
8115+
param.detailedFindings,
80928116
options
80938117
);
80948118
return requestContextPromise.then((requestContext) => {
@@ -8127,6 +8151,7 @@ export class SecurityMonitoringApi {
81278151
param.filterEvaluation,
81288152
param.filterStatus,
81298153
param.filterVulnerabilityType,
8154+
param.detailedFindings,
81308155
options
81318156
);
81328157
const responseContext = await this.configuration.httpApi.send(

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

Lines changed: 16 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
*/
@@ -72,6 +80,14 @@ export class FindingAttributes {
7280
* @ignore
7381
*/
7482
static readonly attributeTypeMap: AttributeTypeMap = {
83+
datadogLink: {
84+
baseName: "datadog_link",
85+
type: "string",
86+
},
87+
description: {
88+
baseName: "description",
89+
type: "string",
90+
},
7591
evaluation: {
7692
baseName: "evaluation",
7793
type: "FindingEvaluation",

0 commit comments

Comments
 (0)