Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,356 changes: 4,356 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions examples/v2/incidents/PatchIncidentImpact.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Patch an incident impact returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.patch_incident_impact".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::IncidentImpactCreateRequest.new({
data: DatadogAPIClient::V2::IncidentImpactCreateData.new({
attributes: DatadogAPIClient::V2::IncidentImpactCreateAttributes.new({
description: "Service was unavailable for external users",
end_at: "2025-08-29T13:17:00Z",
fields: DatadogAPIClient::V2::IncidentImpactFieldsObject.new({}),
start_at: "2025-08-28T13:17:00Z",
}),
type: DatadogAPIClient::V2::IncidentImpactType::INCIDENT_IMPACTS,
}),
})
p api_instance.patch_incident_impact("incident_id", "impact_id", body)
20 changes: 20 additions & 0 deletions examples/v2/incidents/UpdateIncidentImpact.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Update an incident impact returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_incident_impact".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::IncidentImpactCreateRequest.new({
data: DatadogAPIClient::V2::IncidentImpactCreateData.new({
attributes: DatadogAPIClient::V2::IncidentImpactCreateAttributes.new({
description: "Service was unavailable for external users",
end_at: "2025-08-29T13:17:00Z",
fields: DatadogAPIClient::V2::IncidentImpactFieldsObject.new({}),
start_at: "2025-08-28T13:17:00Z",
}),
type: DatadogAPIClient::V2::IncidentImpactType::INCIDENT_IMPACTS,
}),
})
p api_instance.update_incident_impact("incident_id", "impact_id", body)
142 changes: 142 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3134,6 +3134,30 @@
"v2.UpdateGlobalIncidentSettings" => {
"body" => "GlobalIncidentSettingsRequest",
},
"v2.CreateIncidentGoogleChatConfiguration" => {
"body" => "IncidentGoogleChatConfigurationRequest",
},
"v2.UpdateIncidentGoogleChatConfiguration" => {
"id" => "UUID",
"body" => "IncidentGoogleChatConfigurationPatchRequest",
},
"v2.CreateIncidentGoogleMeetConfiguration" => {
"body" => "IncidentGoogleMeetConfigurationRequest",
},
"v2.UpdateIncidentGoogleMeetConfiguration" => {
"id" => "UUID",
"body" => "IncidentGoogleMeetConfigurationPatchRequest",
},
"v2.CreateIncidentImpactField" => {
"body" => "IncidentImpactFieldRequest",
},
"v2.DeleteIncidentImpactField" => {
"field_id" => "UUID",
},
"v2.UpdateIncidentImpactField" => {
"field_id" => "UUID",
"body" => "IncidentImpactFieldRequest",
},
"v2.ListIncidentNotificationRules" => {
"include" => "String",
},
Expand Down Expand Up @@ -3186,12 +3210,36 @@
"template_id" => "String",
"body" => "PostmortemTemplateRequest",
},
"v2.ListIncidentRules" => {
"filter_task_id" => "String",
"filter_trigger" => "String",
"incident_type_uuid" => "UUID",
},
"v2.CreateIncidentRule" => {
"body" => "IncidentRuleRequest",
},
"v2.DeleteIncidentRule" => {
"rule_id" => "UUID",
},
"v2.GetIncidentRule" => {
"rule_id" => "UUID",
},
"v2.UpdateIncidentRule" => {
"rule_id" => "UUID",
"body" => "IncidentRulePatchRequest",
},
"v2.ListIncidentTypes" => {
"include_deleted" => "Boolean",
},
"v2.CreateIncidentType" => {
"body" => "IncidentTypeCreateRequest",
},
"v2.ListOrgSettings" => {
"page_size" => "Integer",
"page_offset" => "Integer",
"include_deleted" => "Boolean",
"include" => "String",
},
"v2.DeleteIncidentType" => {
"incident_type_id" => "String",
},
Expand All @@ -3202,6 +3250,10 @@
"incident_type_id" => "String",
"body" => "IncidentTypePatchRequest",
},
"v2.GetOrgSettingsByIncidentType" => {
"incident_type_id" => "UUID",
"include" => "String",
},
"v2.ListIncidentUserDefinedFields" => {
"page_size" => "Integer",
"page_number" => "Integer",
Expand All @@ -3225,6 +3277,26 @@
"include" => "String",
"body" => "IncidentUserDefinedFieldUpdateRequest",
},
"v2.ListIncidentUserDefinedRoles" => {
"filter_incident_type" => "UUID",
"include" => "String",
},
"v2.CreateIncidentUserDefinedRole" => {
"include" => "String",
"body" => "IncidentUserDefinedRoleRequest",
},
"v2.DeleteIncidentUserDefinedRole" => {
"role_id" => "UUID",
},
"v2.GetIncidentUserDefinedRole" => {
"role_id" => "UUID",
"include" => "String",
},
"v2.UpdateIncidentUserDefinedRole" => {
"role_id" => "UUID",
"include" => "String",
"body" => "IncidentUserDefinedRolePatchRequest",
},
"v2.ImportIncident" => {
"include" => "Array<IncidentImportRelatedObject>",
"body" => "IncidentImportRequest",
Expand All @@ -3248,6 +3320,9 @@
"include" => "Array<IncidentRelatedObject>",
"body" => "IncidentUpdateRequest",
},
"v2.GetIncidentAIPostmortem" => {
"incident_id" => "String",
},
"v2.ListIncidentAttachments" => {
"incident_id" => "String",
"filter_attachment_type" => "String",
Expand All @@ -3272,6 +3347,18 @@
"include" => "String",
"body" => "PatchAttachmentRequest",
},
"v2.CreatePageFromIncident" => {
"incident_id" => "String",
"body" => "IncidentCreatePageFromIncidentRequest",
},
"v2.UpdateIncidentConfiguration" => {
"incident_id" => "String",
"body" => "IncidentConfigurationPatchRequest",
},
"v2.CreateIncidentConfiguration" => {
"incident_id" => "String",
"body" => "IncidentConfigurationRequest",
},
"v2.ListIncidentImpacts" => {
"incident_id" => "String",
"include" => "Array<IncidentImpactRelatedObject>",
Expand All @@ -3285,6 +3372,26 @@
"incident_id" => "String",
"impact_id" => "String",
},
"v2.PatchIncidentImpact" => {
"incident_id" => "String",
"impact_id" => "String",
"include" => "Array<IncidentImpactRelatedObject>",
"body" => "IncidentImpactCreateRequest",
},
"v2.UpdateIncidentImpact" => {
"incident_id" => "String",
"impact_id" => "String",
"include" => "Array<IncidentImpactRelatedObject>",
"body" => "IncidentImpactCreateRequest",
},
"v2.CreateOnCallPageFromIncident" => {
"incident_id" => "String",
"body" => "IncidentCreateOnCallPageRequest",
},
"v2.LinkPageToIncident" => {
"incident_id" => "String",
"body" => "IncidentOnCallPageLinkRequest",
},
"v2.ListIncidentIntegrations" => {
"incident_id" => "String",
},
Expand Down Expand Up @@ -3325,6 +3432,41 @@
"todo_id" => "String",
"body" => "IncidentTodoPatchRequest",
},
"v2.ListIncidentResponders" => {
"incident_id" => "String",
},
"v2.CreateIncidentResponder" => {
"incident_id" => "String",
"body" => "IncidentResponderRequest",
},
"v2.DeleteIncidentResponder" => {
"incident_id" => "String",
"responder_id" => "UUID",
},
"v2.GetIncidentResponder" => {
"incident_id" => "String",
"responder_id" => "UUID",
},
"v2.CreateIncidentServiceNowRecord" => {
"incident_id" => "String",
"body" => "IncidentServiceNowRecordRequest",
},
"v2.ListTimestampOverrides" => {
"incident_id" => "String",
},
"v2.CreateTimestampOverride" => {
"incident_id" => "String",
"body" => "IncidentTimestampOverrideRequest",
},
"v2.DeleteTimestampOverride" => {
"incident_id" => "String",
"id" => "UUID",
},
"v2.UpdateTimestampOverride" => {
"incident_id" => "String",
"id" => "UUID",
"body" => "IncidentTimestampOverridePatchRequest",
},
"v2.ListAWSAccounts" => {
"aws_account_id" => "String",
},
Expand Down
60 changes: 60 additions & 0 deletions features/v2/incidents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,36 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Patch an incident impact returns "Bad Request" response
Given operation "PatchIncidentImpact" enabled
And new "PatchIncidentImpact" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "impact_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Patch an incident impact returns "Not Found" response
Given operation "PatchIncidentImpact" enabled
And new "PatchIncidentImpact" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "impact_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Patch an incident impact returns "OK" response
Given operation "PatchIncidentImpact" enabled
And new "PatchIncidentImpact" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "impact_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}}
When the request is sent
Then the response status is 200 OK

@team:DataDog/incident-app
Scenario: Remove commander from an incident returns "OK" response
Given operation "UpdateIncident" enabled
Expand Down Expand Up @@ -1232,6 +1262,36 @@ Feature: Incidents
Then the response status is 200 OK
And the response "data.attributes.title" is equal to "{{ incident.data.attributes.title }}-updated"

@generated @skip @team:DataDog/incident-app
Scenario: Update an incident impact returns "Bad Request" response
Given operation "UpdateIncidentImpact" enabled
And new "UpdateIncidentImpact" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "impact_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Update an incident impact returns "Not Found" response
Given operation "UpdateIncidentImpact" enabled
And new "UpdateIncidentImpact" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "impact_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Update an incident impact returns "OK" response
Given operation "UpdateIncidentImpact" enabled
And new "UpdateIncidentImpact" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "impact_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Service was unavailable for external users", "end_at": "2025-08-29T13:17:00Z", "fields": {"customers_impacted": "all", "products_impacted": ["shopping", "marketing"]}, "start_at": "2025-08-28T13:17:00Z"}, "type": "incident_impacts"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:Datadog/incident-app
Scenario: Update an incident notification rule returns "Bad Request" response
Given operation "UpdateIncidentNotificationRule" enabled
Expand Down
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2992,6 +2992,18 @@
"type": "idempotent"
}
},
"PatchIncidentImpact": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"UpdateIncidentImpact": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"ListIncidentIntegrations": {
"tag": "Incidents",
"undo": {
Expand Down
Loading
Loading