Skip to content

Commit 3e00a77

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

File tree

28 files changed

+201
-65
lines changed

28 files changed

+201
-65
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-27 17:12:13.841874",
8-
"spec_repo_commit": "ed439f7c"
7+
"regenerated": "2025-06-02 13:31:14.108910",
8+
"spec_repo_commit": "a6273f07"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-27 17:12:13.857049",
13-
"spec_repo_commit": "ed439f7c"
12+
"regenerated": "2025-06-02 13:31:14.145494",
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: 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:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-04-10T10:29:43.940Z
1+
2025-04-03T20:58:02.871Z

tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_bad_request_response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_bad_request_response-1744280983","host:abc"]},"name":"test
3+
body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_bad_request_response-1743713882","host:abc"]},"name":"test
44
rule","recipients":["@slack-test-channel","@jira-test"]},"type":"monitor-notification-rule"}}'
55
headers:
66
accept:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-04-10T10:29:44.273Z
1+
2025-04-03T20:58:03.005Z

tests/v2/cassettes/test_scenarios/test_create_a_monitor_notification_rule_returns_ok_response.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1744280984"]},"name":"test
3+
body: '{"data":{"attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1743713883"]},"name":"test
44
rule","recipients":["slack-test-channel","jira-test"]},"type":"monitor-notification-rule"}}'
55
headers:
66
accept:
@@ -11,8 +11,8 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule
1212
response:
1313
body:
14-
string: '{"data":{"type":"monitor-notification-rule","attributes":{"filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1744280984"]},"recipients":["slack-test-channel","jira-test"],"name":"test
15-
rule","created_at":"2025-04-10T10:29:44.595607+00:00","modified_at":"1970-01-01T00:00:00+00:00"},"id":"a3323ef6-2a04-4ef9-8de8-cbcff5c3c203","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"[email protected]","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"[email protected]","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]}
14+
string: '{"data":{"type":"monitor-notification-rule","id":"55959a04-463a-4579-8386-8c2ca120aa52","attributes":{"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","filter":{"tags":["test:test-create_a_monitor_notification_rule_returns_ok_response-1743713883"]},"created_at":"2025-04-03T20:58:03.137650+00:00","recipients":["slack-test-channel","jira-test"],"name":"test
15+
rule","modified_at":"1970-01-01T00:00:00+00:00"}}}
1616
1717
'
1818
headers:
@@ -27,7 +27,7 @@ interactions:
2727
accept:
2828
- '*/*'
2929
method: DELETE
30-
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/a3323ef6-2a04-4ef9-8de8-cbcff5c3c203
30+
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/55959a04-463a-4579-8386-8c2ca120aa52
3131
response:
3232
body:
3333
string: ''
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-04-10T10:29:46.694Z
1+
2025-04-03T20:58:03.324Z

tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_not_found_response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interactions:
88
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/00000000-0000-1234-0000-000000000000
99
response:
1010
body:
11-
string: '{"errors":["Monitor Notification Rule not found"]}'
11+
string: '{"errors":["Monitor notification rule not found"]}'
1212
headers:
1313
content-type:
1414
- application/json
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-04-10T10:29:47.053Z
1+
2025-04-03T20:58:03.428Z

tests/v2/cassettes/test_scenarios/test_delete_a_monitor_notification_rule_returns_ok_response.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1744280987"]},"name":"test
3+
body: '{"data":{"attributes":{"filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1743713883"]},"name":"test
44
rule","recipients":["slack-monitor-app"]},"type":"monitor-notification-rule"}}'
55
headers:
66
accept:
@@ -11,8 +11,8 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule
1212
response:
1313
body:
14-
string: '{"data":{"type":"monitor-notification-rule","relationships":{"created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}},"attributes":{"filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1744280987"]},"created_at":"2025-04-10T10:29:47.326243+00:00","name":"test
15-
rule","recipients":["slack-monitor-app"],"modified_at":"1970-01-01T00:00:00+00:00"},"id":"66e399af-c07e-414d-b4f2-93e196d7b7b7"},"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":"frog","handle":"[email protected]","created_at":"2019-10-02T08:15:39.795051+00:00","modified_at":"2025-04-07T20:19:46.118466+00:00","email":"[email protected]","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","title":null,"verified":true,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Active"}}]}
14+
string: '{"data":{"type":"monitor-notification-rule","id":"cef4c2c7-27b3-4259-9bdd-ec434b4a8a0e","attributes":{"creator_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","name":"test
15+
rule","created_at":"2025-04-03T20:58:03.555501+00:00","modified_at":"1970-01-01T00:00:00+00:00","filter":{"tags":["app:test-delete_a_monitor_notification_rule_returns_ok_response-1743713883"]},"recipients":["slack-monitor-app"]}}}
1616
1717
'
1818
headers:
@@ -27,7 +27,7 @@ interactions:
2727
accept:
2828
- '*/*'
2929
method: DELETE
30-
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/66e399af-c07e-414d-b4f2-93e196d7b7b7
30+
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/cef4c2c7-27b3-4259-9bdd-ec434b4a8a0e
3131
response:
3232
body:
3333
string: ''
@@ -43,10 +43,10 @@ interactions:
4343
accept:
4444
- '*/*'
4545
method: DELETE
46-
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/66e399af-c07e-414d-b4f2-93e196d7b7b7
46+
uri: https://api.datadoghq.com/api/v2/monitor/notification_rule/cef4c2c7-27b3-4259-9bdd-ec434b4a8a0e
4747
response:
4848
body:
49-
string: '{"errors":["Monitor Notification Rule not found"]}'
49+
string: '{"errors":["Monitor notification rule not found"]}'
5050
headers:
5151
content-type:
5252
- application/json
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-04-10T10:29:52.213Z
1+
2025-04-03T20:58:03.884Z

0 commit comments

Comments
 (0)