Skip to content

Commit bb8b668

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit faa72400 of spec repo
1 parent 8fb4ffd commit bb8b668

File tree

8 files changed

+147
-11
lines changed

8 files changed

+147
-11
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-06-05 08:11:21.207273",
8-
"spec_repo_commit": "0e7259ca"
7+
"regenerated": "2025-06-05 09:49:43.090375",
8+
"spec_repo_commit": "faa72400"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-05 08:11:21.224587",
13-
"spec_repo_commit": "0e7259ca"
12+
"regenerated": "2025-06-05 09:49:43.107941",
13+
"spec_repo_commit": "faa72400"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15279,10 +15279,16 @@ components:
1527915279
FindingAttributes:
1528015280
description: The JSON:API attributes of the finding.
1528115281
properties:
15282+
datadog_link:
15283+
$ref: '#/components/schemas/FindingDatadogLink'
15284+
description:
15285+
$ref: '#/components/schemas/FindingDescription'
1528215286
evaluation:
1528315287
$ref: '#/components/schemas/FindingEvaluation'
1528415288
evaluation_changed_at:
1528515289
$ref: '#/components/schemas/FindingEvaluationChangedAt'
15290+
external_id:
15291+
$ref: '#/components/schemas/FindingExternalId'
1528615292
mute:
1528715293
$ref: '#/components/schemas/FindingMute'
1528815294
resource:
@@ -15300,6 +15306,22 @@ components:
1530015306
vulnerability_type:
1530115307
$ref: '#/components/schemas/FindingVulnerabilityType'
1530215308
type: object
15309+
FindingDatadogLink:
15310+
description: The Datadog relative link for this finding.
15311+
example: /security/compliance?panels=cpfinding%7Cevent%7CruleId%3Adef-000-u5t%7CresourceId%3Ae8c9ab7c52ebd7bf2fdb4db641082d7d%7CtabId%3Aoverview
15312+
type: string
15313+
FindingDescription:
15314+
description: The description and remediation steps for this finding.
15315+
example: '## Remediation
15316+
15317+
15318+
1. In the console, go to **Storage Account**.
15319+
15320+
2. For each Storage Account, navigate to **Data Protection**.
15321+
15322+
3. Select **Set soft delete enabled** and enter the number of days to retain
15323+
soft deleted data.'
15324+
type: string
1530315325
FindingEvaluation:
1530415326
description: The evaluation of the finding.
1530515327
enum:
@@ -15317,6 +15339,10 @@ components:
1531715339
format: int64
1531815340
minimum: 1
1531915341
type: integer
15342+
FindingExternalId:
15343+
description: The cloud-based ID for the resource related to the finding.
15344+
example: arn:aws:s3:::my-example-bucket
15345+
type: string
1532015346
FindingID:
1532115347
description: The unique ID for this finding.
1532215348
example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==
@@ -53082,13 +53108,19 @@ paths:
5308253108
the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.\n\nQuery
5308353109
parameters must be only among the documented ones and with values of correct
5308453110
types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`)
53085-
are not allowed.\n\n### Response\n\nThe response includes an array of finding
53086-
objects, pagination metadata, and a count of items that match the query.\n\nEach
53087-
finding object contains the following:\n\n- The finding ID that can be used
53088-
in a `GetFinding` request to retrieve the full finding details.\n- Core attributes,
53089-
including status, evaluation, high-level resource details, muted state, and
53090-
rule details.\n- `evaluation_changed_at` and `resource_discovery_date` time
53091-
stamps.\n- An array of associated tags.\n"
53111+
are not allowed.\n\n### Additional extension fields\n\nAdditional extension
53112+
fields are available for some findings.\n\nThe data is available when you
53113+
include the query parameter `?detailed_findings=true` in the request.\n\nThe
53114+
following fields are available for findings:\n- `external_id`: The resource
53115+
external ID related to the finding.\n- `description`: The description and
53116+
remediation steps for the finding.\n- `datadog_link`: The Datadog relative
53117+
link for the finding.\n\n### Response\n\nThe response includes an array of
53118+
finding objects, pagination metadata, and a count of items that match the
53119+
query.\n\nEach finding object contains the following:\n\n- The finding ID
53120+
that can be used in a `GetFinding` request to retrieve the full finding details.\n-
53121+
Core attributes, including status, evaluation, high-level resource details,
53122+
muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
53123+
time stamps.\n- An array of associated tags.\n"
5309253124
operationId: ListFindings
5309353125
parameters:
5309453126
- description: Limit the number of findings returned. Must be <= 1000.
@@ -53191,6 +53223,14 @@ paths:
5319153223
items:
5319253224
$ref: '#/components/schemas/FindingVulnerabilityType'
5319353225
type: array
53226+
- description: Return additional fields for some findings.
53227+
example:
53228+
- true
53229+
in: query
53230+
name: detailed_findings
53231+
required: false
53232+
schema:
53233+
type: boolean
5319453234
responses:
5319553235
'200':
5319653236
content:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List findings returns "OK" response with details
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_findings"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = SecurityMonitoringApi(api_client)
12+
response = api_instance.list_findings(
13+
detailed_findings=True,
14+
)
15+
16+
print(response)

src/datadog_api_client/v2/api/security_monitoring_api.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,11 @@ def __init__(self, api_client=None):
10001000
"location": "query",
10011001
"collection_format": "multi",
10021002
},
1003+
"detailed_findings": {
1004+
"openapi_types": (bool,),
1005+
"attribute": "detailed_findings",
1006+
"location": "query",
1007+
},
10031008
},
10041009
headers_map={
10051010
"accept": ["application/json"],
@@ -2462,6 +2467,7 @@ def list_findings(
24622467
filter_evaluation: Union[FindingEvaluation, UnsetType] = unset,
24632468
filter_status: Union[FindingStatus, UnsetType] = unset,
24642469
filter_vulnerability_type: Union[List[FindingVulnerabilityType], UnsetType] = unset,
2470+
detailed_findings: Union[bool, UnsetType] = unset,
24652471
) -> ListFindingsResponse:
24662472
"""List findings.
24672473
@@ -2487,6 +2493,18 @@ def list_findings(
24872493
24882494
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.
24892495
2496+
**Additional extension fields**
2497+
2498+
Additional extension fields are available for some findings.
2499+
2500+
The data is available when you include the query parameter ``?detailed_findings=true`` in the request.
2501+
2502+
The following fields are available for findings:
2503+
2504+
* ``external_id`` : The resource external ID related to the finding.
2505+
* ``description`` : The description and remediation steps for the finding.
2506+
* ``datadog_link`` : The Datadog relative link for the finding.
2507+
24902508
**Response**
24912509
24922510
The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
@@ -2524,6 +2542,8 @@ def list_findings(
25242542
:type filter_status: FindingStatus, optional
25252543
:param filter_vulnerability_type: Return findings that match the selected vulnerability types (repeatable).
25262544
:type filter_vulnerability_type: [FindingVulnerabilityType], optional
2545+
:param detailed_findings: Return additional fields for some findings.
2546+
:type detailed_findings: bool, optional
25272547
:rtype: ListFindingsResponse
25282548
"""
25292549
kwargs: Dict[str, Any] = {}
@@ -2566,6 +2586,9 @@ def list_findings(
25662586
if filter_vulnerability_type is not unset:
25672587
kwargs["filter_vulnerability_type"] = filter_vulnerability_type
25682588

2589+
if detailed_findings is not unset:
2590+
kwargs["detailed_findings"] = detailed_findings
2591+
25692592
return self._list_findings_endpoint.call_with_http_info(**kwargs)
25702593

25712594
def list_findings_with_pagination(
@@ -2584,6 +2607,7 @@ def list_findings_with_pagination(
25842607
filter_evaluation: Union[FindingEvaluation, UnsetType] = unset,
25852608
filter_status: Union[FindingStatus, UnsetType] = unset,
25862609
filter_vulnerability_type: Union[List[FindingVulnerabilityType], UnsetType] = unset,
2610+
detailed_findings: Union[bool, UnsetType] = unset,
25872611
) -> collections.abc.Iterable[Finding]:
25882612
"""List findings.
25892613
@@ -2615,6 +2639,8 @@ def list_findings_with_pagination(
26152639
:type filter_status: FindingStatus, optional
26162640
:param filter_vulnerability_type: Return findings that match the selected vulnerability types (repeatable).
26172641
:type filter_vulnerability_type: [FindingVulnerabilityType], optional
2642+
:param detailed_findings: Return additional fields for some findings.
2643+
:type detailed_findings: bool, optional
26182644
26192645
:return: A generator of paginated results.
26202646
:rtype: collections.abc.Iterable[Finding]
@@ -2659,6 +2685,9 @@ def list_findings_with_pagination(
26592685
if filter_vulnerability_type is not unset:
26602686
kwargs["filter_vulnerability_type"] = filter_vulnerability_type
26612687

2688+
if detailed_findings is not unset:
2689+
kwargs["detailed_findings"] = detailed_findings
2690+
26622691
local_page_size = get_attribute_from_path(kwargs, "page_limit", 100)
26632692
endpoint = self._list_findings_endpoint
26642693
set_attribute_from_path(kwargs, "page_limit", local_page_size, endpoint.params_map)

src/datadog_api_client/v2/model/finding_attributes.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ def openapi_types(_):
4040
from datadog_api_client.v2.model.finding_vulnerability_type import FindingVulnerabilityType
4141

4242
return {
43+
"datadog_link": (str,),
44+
"description": (str,),
4345
"evaluation": (FindingEvaluation,),
4446
"evaluation_changed_at": (int,),
47+
"external_id": (str,),
4548
"mute": (FindingMute,),
4649
"resource": (str,),
4750
"resource_discovery_date": (int,),
@@ -53,8 +56,11 @@ def openapi_types(_):
5356
}
5457

5558
attribute_map = {
59+
"datadog_link": "datadog_link",
60+
"description": "description",
5661
"evaluation": "evaluation",
5762
"evaluation_changed_at": "evaluation_changed_at",
63+
"external_id": "external_id",
5864
"mute": "mute",
5965
"resource": "resource",
6066
"resource_discovery_date": "resource_discovery_date",
@@ -67,8 +73,11 @@ def openapi_types(_):
6773

6874
def __init__(
6975
self_,
76+
datadog_link: Union[str, UnsetType] = unset,
77+
description: Union[str, UnsetType] = unset,
7078
evaluation: Union[FindingEvaluation, UnsetType] = unset,
7179
evaluation_changed_at: Union[int, UnsetType] = unset,
80+
external_id: Union[str, UnsetType] = unset,
7281
mute: Union[FindingMute, UnsetType] = unset,
7382
resource: Union[str, UnsetType] = unset,
7483
resource_discovery_date: Union[int, UnsetType] = unset,
@@ -82,12 +91,21 @@ def __init__(
8291
"""
8392
The JSON:API attributes of the finding.
8493
94+
:param datadog_link: The Datadog relative link for this finding.
95+
:type datadog_link: str, optional
96+
97+
:param description: The description and remediation steps for this finding.
98+
:type description: str, optional
99+
85100
:param evaluation: The evaluation of the finding.
86101
:type evaluation: FindingEvaluation, optional
87102
88103
:param evaluation_changed_at: The date on which the evaluation for this finding changed (Unix ms).
89104
:type evaluation_changed_at: int, optional
90105
106+
:param external_id: The cloud-based ID for the resource related to the finding.
107+
:type external_id: str, optional
108+
91109
:param mute: Information about the mute status of this finding.
92110
:type mute: FindingMute, optional
93111
@@ -112,10 +130,16 @@ def __init__(
112130
:param vulnerability_type: The vulnerability type of the finding.
113131
:type vulnerability_type: FindingVulnerabilityType, optional
114132
"""
133+
if datadog_link is not unset:
134+
kwargs["datadog_link"] = datadog_link
135+
if description is not unset:
136+
kwargs["description"] = description
115137
if evaluation is not unset:
116138
kwargs["evaluation"] = evaluation
117139
if evaluation_changed_at is not unset:
118140
kwargs["evaluation_changed_at"] = evaluation_changed_at
141+
if external_id is not unset:
142+
kwargs["external_id"] = external_id
119143
if mute is not unset:
120144
kwargs["mute"] = mute
121145
if resource is not unset:
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/posture_management/findings?detailed_findings=true
9+
response:
10+
body:
11+
string: '{"data":[],"meta":{"page":{"total_filtered_count":0},"snapshot_timestamp":1747743085077}}'
12+
headers:
13+
content-type:
14+
- application/vnd.api+json
15+
status:
16+
code: 200
17+
message: OK
18+
version: 1

tests/v2/features/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

0 commit comments

Comments
 (0)