Skip to content

Commit

Permalink
[INA-6530] Update incident type APIs to create/update non-default inc…
Browse files Browse the repository at this point in the history
…ident types (#2759)

Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 4, 2024
1 parent 1bb5a3c commit 213dd85
Show file tree
Hide file tree
Showing 43 changed files with 174 additions and 165 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-04 20:35:50.956795",
"spec_repo_commit": "0a78d630"
"regenerated": "2024-11-04 21:14:28.135343",
"spec_repo_commit": "08338fd1"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-04 20:35:50.974863",
"spec_repo_commit": "0a78d630"
"regenerated": "2024-11-04 21:14:28.155292",
"spec_repo_commit": "08338fd1"
}
}
}
4 changes: 2 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11964,7 +11964,7 @@ components:
default: false
description: If true, this incident type will be used as the default incident
type if a type is not specified during the creation of incident resources.
example: true
example: false
type: boolean
lastModifiedBy:
description: A unique identifier that represents the user that last modified
Expand Down Expand Up @@ -12099,7 +12099,7 @@ components:
is_default:
description: When true, this incident type will be used as the default type
when an incident type is not specified.
example: true
example: false
type: boolean
lastModifiedBy:
description: A unique identifier that represents the user that last modified
Expand Down
6 changes: 3 additions & 3 deletions examples/v2/incidents/CreateIncidentType.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ func main() {
body := datadogV2.IncidentTypeCreateRequest{
Data: datadogV2.IncidentTypeCreateData{
Attributes: datadogV2.IncidentTypeAttributes{
Description: datadog.PtrString("8d4bbb66dccf2456"),
IsDefault: datadog.PtrBool(true),
Name: "8d4bbb66dccf2456",
Description: datadog.PtrString("Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data."),
IsDefault: datadog.PtrBool(false),
Name: "Security Incident",
},
Type: datadogV2.INCIDENTTYPETYPE_INCIDENT_TYPES,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-06T20:25:23.087Z
2024-11-04T19:02:15.577Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: |
{"data":{"attributes":{"email":"Test-Add_commander_to_an_incident_returns_OK_response-1699302323@datadoghq.com","title":"user title"},"type":"users"}}
{"data":{"attributes":{"email":"Test-Add_commander_to_an_incident_returns_OK_response-1730746935@datadoghq.com","title":"user title"},"type":"users"}}
form: {}
headers:
Accept:
Expand All @@ -12,7 +12,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v2/users
response:
body: '{"data":{"type":"users","id":"9cee6c65-7ce2-11ee-afa1-d613a1313e9b","attributes":{"name":null,"handle":"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com","created_at":"2023-11-06T20:25:23.238858+00:00","modified_at":"2023-11-06T20:25:23.238858+00:00","email":"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com","icon":"https://secure.gravatar.com/avatar/3635a30484b69ec7f1dd8be2aa1962c6?s=48&d=retro","title":"user
body: '{"data":{"type":"users","id":"4e8b9688-9adf-11ef-979b-eaf7d876ef9c","attributes":{"name":null,"handle":"test-add_commander_to_an_incident_returns_ok_response-1730746935@datadoghq.com","created_at":"2024-11-04T19:02:15.793044+00:00","modified_at":"2024-11-04T19:02:15.793044+00:00","email":"test-add_commander_to_an_incident_returns_ok_response-1730746935@datadoghq.com","icon":"https://secure.gravatar.com/avatar/10ba7db1ef556b5e09d8be44f6394ec1?s=48&d=retro","title":"user
title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}
'
Expand All @@ -24,7 +24,7 @@ interactions:
status: 201 Created
- request:
body: |
{"data":{"attributes":{"customer_impacted":false,"title":"Test-Add_commander_to_an_incident_returns_OK_response-1699302323"},"type":"incidents"}}
{"data":{"attributes":{"customer_impacted":false,"title":"Test-Add_commander_to_an_incident_returns_OK_response-1730746935"},"type":"incidents"}}
form: {}
headers:
Accept:
Expand All @@ -35,7 +35,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v2/incidents
response:
body: '{"data":{"type":"incidents","id":"ef130d24-3827-5ca3-85ae-700fe155b6ae","attributes":{"public_id":174802,"incident_type_uuid":"f7341da0-aaac-4ecf-aa65-5b094f4ecc42","title":"Test-Add_commander_to_an_incident_returns_OK_response-1699302323","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:23.425656+00:00","modified":"2023-11-06T20:25:23.425656+00:00","commander":null,"detected":"2023-11-06T20:25:23.412982+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":[]}}}}
body: '{"data":{"type":"incidents","id":"388973df-8982-5114-94c7-9cc0f85837cf","attributes":{"public_id":250834,"incident_type_uuid":"41d2e10b-4108-4736-92d7-791d00ea0702","title":"Test-Add_commander_to_an_incident_returns_OK_response-1730746935","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:15.973800+00:00","modified":"2024-11-04T19:02:15.973800+00:00","commander":null,"detected":"2024-11-04T19:02:15.966086+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":[]}}}}

'
code: 201
Expand All @@ -46,7 +46,7 @@ interactions:
status: 201 Created
- request:
body: |
{"data":{"id":"ef130d24-3827-5ca3-85ae-700fe155b6ae","relationships":{"commander_user":{"data":{"id":"9cee6c65-7ce2-11ee-afa1-d613a1313e9b","type":"users"}}},"type":"incidents"}}
{"data":{"id":"388973df-8982-5114-94c7-9cc0f85837cf","relationships":{"commander_user":{"data":{"id":"4e8b9688-9adf-11ef-979b-eaf7d876ef9c","type":"users"}}},"type":"incidents"}}
form: {}
headers:
Accept:
Expand All @@ -55,9 +55,9 @@ interactions:
- application/json
id: 2
method: PATCH
url: https://api.datadoghq.com/api/v2/incidents/ef130d24-3827-5ca3-85ae-700fe155b6ae
url: https://api.datadoghq.com/api/v2/incidents/388973df-8982-5114-94c7-9cc0f85837cf
response:
body: '{"data":{"type":"incidents","id":"ef130d24-3827-5ca3-85ae-700fe155b6ae","attributes":{"public_id":174802,"incident_type_uuid":"f7341da0-aaac-4ecf-aa65-5b094f4ecc42","title":"Test-Add_commander_to_an_incident_returns_OK_response-1699302323","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":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2023-11-06T20:25:23.425656+00:00","modified":"2023-11-06T20:25:23.853499+00:00","commander":{"data":{"type":"users","id":"9cee6c65-7ce2-11ee-afa1-d613a1313e9b","attributes":{"uuid":"9cee6c65-7ce2-11ee-afa1-d613a1313e9b","handle":"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com","email":"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/3635a30484b69ec7f1dd8be2aa1962c6?s=48&d=retro"}}},"detected":"2023-11-06T20:25:23.412982+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":"3ad549bf-eba0-11e9-a77a-0705486660d0","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":[{"type":"incident_responders","id":"a08d26e3-2baf-51dc-a956-a1df39b65108"},{"type":"incident_responders","id":"28394b67-84ac-5ace-80bc-da0472019eae"}]},"impacts":{"data":[]}}}}
body: '{"data":{"type":"incidents","id":"388973df-8982-5114-94c7-9cc0f85837cf","attributes":{"public_id":250834,"incident_type_uuid":"41d2e10b-4108-4736-92d7-791d00ea0702","title":"Test-Add_commander_to_an_incident_returns_OK_response-1730746935","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":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2024-11-04T19:02:15.973800+00:00","modified":"2024-11-04T19:02:16.334453+00:00","commander":{"data":{"type":"users","id":"4e8b9688-9adf-11ef-979b-eaf7d876ef9c","attributes":{"uuid":"4e8b9688-9adf-11ef-979b-eaf7d876ef9c","handle":"test-add_commander_to_an_incident_returns_ok_response-1730746935@datadoghq.com","email":"test-add_commander_to_an_incident_returns_ok_response-1730746935@datadoghq.com","name":null,"icon":"https://secure.gravatar.com/avatar/10ba7db1ef556b5e09d8be44f6394ec1?s=48&d=retro"}}},"detected":"2024-11-04T19:02:15.966086+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":"3ad549bf-eba0-11e9-a77a-0705486660d0","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":[{"type":"incident_responders","id":"46c4a58a-2811-5836-b90b-71e56773521c"},{"type":"incident_responders","id":"d76803e2-bf32-5134-8140-d0cb3ad549af"}]},"impacts":{"data":[]}}}}
'
code: 200
Expand All @@ -74,7 +74,7 @@ interactions:
- '*/*'
id: 3
method: DELETE
url: https://api.datadoghq.com/api/v2/incidents/ef130d24-3827-5ca3-85ae-700fe155b6ae
url: https://api.datadoghq.com/api/v2/incidents/388973df-8982-5114-94c7-9cc0f85837cf
response:
body: ''
code: 204
Expand All @@ -91,7 +91,7 @@ interactions:
- '*/*'
id: 4
method: DELETE
url: https://api.datadoghq.com/api/v2/users/9cee6c65-7ce2-11ee-afa1-d613a1313e9b
url: https://api.datadoghq.com/api/v2/users/4e8b9688-9adf-11ef-979b-eaf7d876ef9c
response:
body: ''
code: 204
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-06T20:25:24.764Z
2024-11-04T19:02:17.223Z
Loading

0 comments on commit 213dd85

Please sign in to comment.