Skip to content

Commit 2aabc14

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[INA-6530] Update incident type APIs to create/update non-default incident types (#2244)
* Regenerate client from commit 08338fd1 of spec repo * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 661d786 commit 2aabc14

File tree

43 files changed

+180
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+180
-165
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": "2024-11-04 20:35:53.442516",
8-
"spec_repo_commit": "0a78d630"
7+
"regenerated": "2024-11-04 21:14:35.996163",
8+
"spec_repo_commit": "08338fd1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-11-04 20:35:53.460358",
13-
"spec_repo_commit": "0a78d630"
12+
"regenerated": "2024-11-04 21:14:36.014063",
13+
"spec_repo_commit": "08338fd1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11964,7 +11964,7 @@ components:
1196411964
default: false
1196511965
description: If true, this incident type will be used as the default incident
1196611966
type if a type is not specified during the creation of incident resources.
11967-
example: true
11967+
example: false
1196811968
type: boolean
1196911969
lastModifiedBy:
1197011970
description: A unique identifier that represents the user that last modified
@@ -12099,7 +12099,7 @@ components:
1209912099
is_default:
1210012100
description: When true, this incident type will be used as the default type
1210112101
when an incident type is not specified.
12102-
example: true
12102+
example: false
1210312103
type: boolean
1210412104
lastModifiedBy:
1210512105
description: A unique identifier that represents the user that last modified

examples/v2/incidents/CreateIncidentType.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
body = IncidentTypeCreateRequest(
1313
data=IncidentTypeCreateData(
1414
attributes=IncidentTypeAttributes(
15-
description="8d4bbb66dccf2456",
16-
is_default=True,
17-
name="8d4bbb66dccf2456",
15+
description="Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.",
16+
is_default=False,
17+
name="Security Incident",
1818
),
1919
type=IncidentTypeType.INCIDENT_TYPES,
2020
),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-06T20:25:23.087Z
1+
2024-11-04T19:02:15.577Z

tests/v2/cassettes/test_scenarios/test_add_commander_to_an_incident_returns_ok_response.yaml

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-06T20:25:24.764Z
1+
2024-11-04T19:02:17.223Z

tests/v2/cassettes/test_scenarios/test_create_an_incident_attachment_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":{"customer_impacted":false,"title":"Test-Create_an_incident_attachment_returns_OK_response-1699302324"},"type":"incidents"}}'
3+
body: '{"data":{"attributes":{"customer_impacted":false,"title":"Test-Create_an_incident_attachment_returns_OK_response-1730746937"},"type":"incidents"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/incidents
1111
response:
1212
body:
13-
string: '{"data":{"type":"incidents","id":"f5faf64f-c9bd-5171-8c9e-e4ce51604c97","attributes":{"public_id":174803,"incident_type_uuid":"f7341da0-aaac-4ecf-aa65-5b094f4ecc42","title":"Test-Create_an_incident_attachment_returns_OK_response-1699302324","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"[email protected]","email":"[email protected]","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2023-11-06T20:25:24.903041+00:00","modified":"2023-11-06T20:25:24.903041+00:00","commander":null,"detected":"2023-11-06T20:25:24.890646+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"[email protected]","email":"[email protected]","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"archived":null,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"state":{"type":"dropdown","value":"active"},"root_cause":{"type":"textbox","value":null},"detection_method":{"type":"dropdown","value":"unknown"},"services":{"type":"autocomplete","value":null},"teams":{"type":"autocomplete","value":null},"summary":{"type":"textbox","value":null}},"field_analytics":null,"severity":"UNKNOWN","state":"active","non_datadog_creator":null,"visibility":"organization","case_id":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":null},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"ccfc9e6c-f586-58e5-b502-03c466c72e6f"}]},"integrations":{"data":[]},"attachments":{"data":[]},"responders":{"data":[]},"impacts":{"data":[]}}}}
13+
string: '{"data":{"type":"incidents","id":"de4affc2-0412-5ed3-9d20-7f71b21ad305","attributes":{"public_id":250835,"incident_type_uuid":"41d2e10b-4108-4736-92d7-791d00ea0702","title":"Test-Create_an_incident_attachment_returns_OK_response-1730746937","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"[email protected]","email":"[email protected]","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"last_modified_by_uuid":null,"created":"2024-11-04T19:02:17.394588+00:00","modified":"2024-11-04T19:02:17.394588+00:00","commander":null,"detected":"2024-11-04T19:02:17.385480+00:00","created_by":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","handle":"[email protected]","email":"[email protected]","name":null,"icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro"}}},"created_by_uuid":null,"creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"archived":null,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"state":{"type":"dropdown","value":"active"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"summary":{"type":"textbox","value":null},"services":{"type":"autocomplete","value":null},"teams":{"type":"autocomplete","value":null}},"field_analytics":null,"severity":"UNKNOWN","state":"active","non_datadog_creator":null,"visibility":"organization","case_id":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":null},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"33457d2a-570c-5567-b4af-979a2a8f1164"},{"type":"user_defined_field","id":"d003693c-bee9-5420-8d46-859269c20914"},{"type":"user_defined_field","id":"1ddff6f6-cb1f-51a0-9d81-dc18ef52cc9d"},{"type":"user_defined_field","id":"6bc9d32b-c2cd-591e-9b7a-74c886a5ddcf"},{"type":"user_defined_field","id":"95c53547-2ba3-5d8a-9c3b-cf245bc0c629"},{"type":"user_defined_field","id":"39044b03-cee4-555f-b1e0-3eb3aa759a86"},{"type":"user_defined_field","id":"3cbe9e60-d794-532c-acc0-73641f782813"}]},"integrations":{"data":[]},"attachments":{"data":[]},"responders":{"data":[]},"impacts":{"data":[]}}}}
1414

1515
'
1616
headers:
@@ -20,17 +20,17 @@ interactions:
2020
code: 201
2121
message: Created
2222
- request:
23-
body: '{"data":[{"attributes":{"attachment":{"documentUrl":"https://www.example.com/doc","title":"Test-Create_an_incident_attachment_returns_OK_response-1699302324"},"attachment_type":"link"},"type":"incident_attachments"}]}'
23+
body: '{"data":[{"attributes":{"attachment":{"documentUrl":"https://www.example.com/doc","title":"Test-Create_an_incident_attachment_returns_OK_response-1730746937"},"attachment_type":"link"},"type":"incident_attachments"}]}'
2424
headers:
2525
accept:
2626
- application/json
2727
content-type:
2828
- application/json
2929
method: PATCH
30-
uri: https://api.datadoghq.com/api/v2/incidents/f5faf64f-c9bd-5171-8c9e-e4ce51604c97/attachments
30+
uri: https://api.datadoghq.com/api/v2/incidents/de4affc2-0412-5ed3-9d20-7f71b21ad305/attachments
3131
response:
3232
body:
33-
string: '{"data":[{"type":"incident_attachments","id":"34749f37-7681-50cb-8cc4-709950a4bd62","attributes":{"modified":"2023-11-06T20:25:25.295458+00:00","attachment_type":"link","attachment":{"title":"Test-Create_an_incident_attachment_returns_OK_response-1699302324","documentUrl":"https://www.example.com/doc"}},"relationships":{"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}]}
33+
string: '{"data":[{"type":"incident_attachments","id":"233c12d5-547a-5638-97e6-6c9d1c456cb7","attributes":{"modified":"2024-11-04T19:02:17.844501+00:00","attachment_type":"link","attachment":{"title":"Test-Create_an_incident_attachment_returns_OK_response-1730746937","documentUrl":"https://www.example.com/doc"}},"relationships":{"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}]}
3434
3535
'
3636
headers:
@@ -45,7 +45,7 @@ interactions:
4545
accept:
4646
- '*/*'
4747
method: DELETE
48-
uri: https://api.datadoghq.com/api/v2/incidents/f5faf64f-c9bd-5171-8c9e-e4ce51604c97
48+
uri: https://api.datadoghq.com/api/v2/incidents/de4affc2-0412-5ed3-9d20-7f71b21ad305
4949
response:
5050
body:
5151
string: ''
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-06T20:25:25.688Z
1+
2024-11-04T19:02:18.198Z

0 commit comments

Comments
 (0)