Skip to content
Merged
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
438 changes: 438 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions examples/v2/incidents/CreateGlobalIncidentHandle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Create global incident handle returns "Created" response

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

body = DatadogAPIClient::V2::IncidentHandleRequest.new({
data: DatadogAPIClient::V2::IncidentHandleDataRequest.new({
attributes: DatadogAPIClient::V2::IncidentHandleAttributesRequest.new({
fields: DatadogAPIClient::V2::IncidentHandleAttributesFields.new({
severity: [
"SEV-1",
],
}),
name: "@incident-sev-1",
}),
id: "b2494081-cdf0-4205-b366-4e1dd4fdf0bf",
relationships: DatadogAPIClient::V2::IncidentHandleRelationshipsRequest.new({
commander_user: DatadogAPIClient::V2::IncidentHandleRelationship.new({
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
type: "incident_types",
}),
}),
incident_type: DatadogAPIClient::V2::IncidentHandleRelationship.new({
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
type: "incident_types",
}),
}),
}),
type: DatadogAPIClient::V2::IncidentHandleType::INCIDENTS_HANDLES,
}),
})
p api_instance.create_global_incident_handle(body)
8 changes: 8 additions & 0 deletions examples/v2/incidents/DeleteGlobalIncidentHandle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete global incident handle returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_global_incident_handle".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
api_instance.delete_global_incident_handle()
8 changes: 8 additions & 0 deletions examples/v2/incidents/GetGlobalIncidentSettings.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get global incident settings returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_global_incident_settings".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.get_global_incident_settings()
8 changes: 8 additions & 0 deletions examples/v2/incidents/ListGlobalIncidentHandles.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List global incident handles returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_global_incident_handles".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.list_global_incident_handles()
37 changes: 37 additions & 0 deletions examples/v2/incidents/UpdateGlobalIncidentHandle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Update global incident handle returns "OK" response

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

body = DatadogAPIClient::V2::IncidentHandleRequest.new({
data: DatadogAPIClient::V2::IncidentHandleDataRequest.new({
attributes: DatadogAPIClient::V2::IncidentHandleAttributesRequest.new({
fields: DatadogAPIClient::V2::IncidentHandleAttributesFields.new({
severity: [
"SEV-1",
],
}),
name: "@incident-sev-1",
}),
id: "b2494081-cdf0-4205-b366-4e1dd4fdf0bf",
relationships: DatadogAPIClient::V2::IncidentHandleRelationshipsRequest.new({
commander_user: DatadogAPIClient::V2::IncidentHandleRelationship.new({
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
type: "incident_types",
}),
}),
incident_type: DatadogAPIClient::V2::IncidentHandleRelationship.new({
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
type: "incident_types",
}),
}),
}),
type: DatadogAPIClient::V2::IncidentHandleType::INCIDENTS_HANDLES,
}),
})
p api_instance.update_global_incident_handle(body)
17 changes: 17 additions & 0 deletions examples/v2/incidents/UpdateGlobalIncidentSettings.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Update global incident settings returns "OK" response

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

body = DatadogAPIClient::V2::GlobalIncidentSettingsRequest.new({
data: DatadogAPIClient::V2::GlobalIncidentSettingsDataRequest.new({
attributes: DatadogAPIClient::V2::GlobalIncidentSettingsAttributesRequest.new({
analytics_dashboard_id: "abc-123-def",
}),
type: DatadogAPIClient::V2::GlobalIncidentSettingsType::INCIDENTS_GLOBAL_SETTINGS,
}),
})
p api_instance.update_global_incident_settings(body)
14 changes: 14 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2068,6 +2068,20 @@
"v2.CreateIncident" => {
"body" => "IncidentCreateRequest",
},
"v2.ListGlobalIncidentHandles" => {
"include" => "String",
},
"v2.CreateGlobalIncidentHandle" => {
"include" => "String",
"body" => "IncidentHandleRequest",
},
"v2.UpdateGlobalIncidentHandle" => {
"include" => "String",
"body" => "IncidentHandleRequest",
},
"v2.UpdateGlobalIncidentSettings" => {
"body" => "GlobalIncidentSettingsRequest",
},
"v2.ListIncidentNotificationRules" => {
"include" => "String",
},
Expand Down
90 changes: 90 additions & 0 deletions features/v2/incidents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,22 @@ Feature: Incidents
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Create global incident handle returns "Bad Request" response
Given operation "CreateGlobalIncidentHandle" enabled
And new "CreateGlobalIncidentHandle" request
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Create global incident handle returns "Created" response
Given operation "CreateGlobalIncidentHandle" enabled
And new "CreateGlobalIncidentHandle" request
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
When the request is sent
Then the response status is 201 Created

@skip @team:DataDog/incident-app
Scenario: Create incident attachment returns "Bad Request" response
Given operation "CreateIncidentAttachment" enabled
Expand Down Expand Up @@ -450,6 +466,20 @@ Feature: Incidents
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/incident-app
Scenario: Delete global incident handle returns "Bad Request" response
Given operation "DeleteGlobalIncidentHandle" enabled
And new "DeleteGlobalIncidentHandle" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Delete global incident handle returns "No Content" response
Given operation "DeleteGlobalIncidentHandle" enabled
And new "DeleteGlobalIncidentHandle" request
When the request is sent
Then the response status is 204 No Content

@skip @team:DataDog/incident-app
Scenario: Delete incident attachment returns "Bad Request" response
Given operation "DeleteIncidentAttachment" enabled
Expand Down Expand Up @@ -633,6 +663,20 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Get global incident settings returns "Bad Request" response
Given operation "GetGlobalIncidentSettings" enabled
And new "GetGlobalIncidentSettings" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Get global incident settings returns "OK" response
Given operation "GetGlobalIncidentSettings" enabled
And new "GetGlobalIncidentSettings" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Get incident integration metadata details returns "Bad Request" response
Given operation "GetIncidentIntegration" enabled
Expand Down Expand Up @@ -816,6 +860,20 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: List global incident handles returns "Bad Request" response
Given operation "ListGlobalIncidentHandles" enabled
And new "ListGlobalIncidentHandles" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: List global incident handles returns "OK" response
Given operation "ListGlobalIncidentHandles" enabled
And new "ListGlobalIncidentHandles" request
When the request is sent
Then the response status is 200 OK

@skip @team:DataDog/incident-app
Scenario: List incident attachments returns "Bad Request" response
Given operation "ListIncidentAttachments" enabled
Expand Down Expand Up @@ -1081,6 +1139,38 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Update global incident handle returns "Bad Request" response
Given operation "UpdateGlobalIncidentHandle" enabled
And new "UpdateGlobalIncidentHandle" request
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Update global incident handle returns "OK" response
Given operation "UpdateGlobalIncidentHandle" enabled
And new "UpdateGlobalIncidentHandle" request
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Update global incident settings returns "Bad Request" response
Given operation "UpdateGlobalIncidentSettings" enabled
And new "UpdateGlobalIncidentSettings" request
And body with value {"data": {"attributes": {"analytics_dashboard_id": "abc-123-def"}, "type": "incidents_global_settings"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Update global incident settings returns "OK" response
Given operation "UpdateGlobalIncidentSettings" enabled
And new "UpdateGlobalIncidentSettings" request
And body with value {"data": {"attributes": {"analytics_dashboard_id": "abc-123-def"}, "type": "incidents_global_settings"}}
When the request is sent
Then the response status is 200 OK

@skip @team:DataDog/incident-app
Scenario: Update incident attachment returns "Bad Request" response
Given operation "UpdateIncidentAttachment" enabled
Expand Down
38 changes: 38 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,44 @@
"type": "unsafe"
}
},
"DeleteGlobalIncidentHandle": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"ListGlobalIncidentHandles": {
"tag": "Incidents",
"undo": {
"type": "safe"
}
},
"CreateGlobalIncidentHandle": {
"tag": "Incidents",
"undo": {
"operationId": "DeleteGlobalIncidentHandle",
"parameters": [],
"type": "unsafe"
}
},
"UpdateGlobalIncidentHandle": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"GetGlobalIncidentSettings": {
"tag": "Incidents",
"undo": {
"type": "safe"
}
},
"UpdateGlobalIncidentSettings": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"ListIncidentNotificationRules": {
"tag": "Incidents",
"undo": {
Expand Down
6 changes: 6 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def initialize
"v2.update_deployment_rule": false,
"v2.create_hamr_org_connection": false,
"v2.get_hamr_org_connection": false,
"v2.create_global_incident_handle": false,
"v2.create_incident": false,
"v2.create_incident_attachment": false,
"v2.create_incident_integration": false,
Expand All @@ -254,19 +255,22 @@ def initialize
"v2.create_incident_postmortem_attachment": false,
"v2.create_incident_todo": false,
"v2.create_incident_type": false,
"v2.delete_global_incident_handle": false,
"v2.delete_incident": false,
"v2.delete_incident_attachment": false,
"v2.delete_incident_integration": false,
"v2.delete_incident_notification_rule": false,
"v2.delete_incident_notification_template": false,
"v2.delete_incident_todo": false,
"v2.delete_incident_type": false,
"v2.get_global_incident_settings": false,
"v2.get_incident": false,
"v2.get_incident_integration": false,
"v2.get_incident_notification_rule": false,
"v2.get_incident_notification_template": false,
"v2.get_incident_todo": false,
"v2.get_incident_type": false,
"v2.list_global_incident_handles": false,
"v2.list_incident_attachments": false,
"v2.list_incident_integrations": false,
"v2.list_incident_notification_rules": false,
Expand All @@ -275,6 +279,8 @@ def initialize
"v2.list_incident_todos": false,
"v2.list_incident_types": false,
"v2.search_incidents": false,
"v2.update_global_incident_handle": false,
"v2.update_global_incident_settings": false,
"v2.update_incident": false,
"v2.update_incident_attachment": false,
"v2.update_incident_integration": false,
Expand Down
21 changes: 21 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,13 @@ def overrides
"v2.gitlab_integration" => "GitlabIntegration",
"v2.gitlab_integration_type" => "GitlabIntegrationType",
"v2.gitlab_integration_update" => "GitlabIntegrationUpdate",
"v2.global_incident_settings_attributes_request" => "GlobalIncidentSettingsAttributesRequest",
"v2.global_incident_settings_attributes_response" => "GlobalIncidentSettingsAttributesResponse",
"v2.global_incident_settings_data_request" => "GlobalIncidentSettingsDataRequest",
"v2.global_incident_settings_data_response" => "GlobalIncidentSettingsDataResponse",
"v2.global_incident_settings_request" => "GlobalIncidentSettingsRequest",
"v2.global_incident_settings_response" => "GlobalIncidentSettingsResponse",
"v2.global_incident_settings_type" => "GlobalIncidentSettingsType",
"v2.global_variable_data" => "GlobalVariableData",
"v2.global_variable_json_patch_request" => "GlobalVariableJsonPatchRequest",
"v2.global_variable_json_patch_request_data" => "GlobalVariableJsonPatchRequestData",
Expand Down Expand Up @@ -2639,6 +2646,20 @@ def overrides
"v2.incident_field_attributes_single_value" => "IncidentFieldAttributesSingleValue",
"v2.incident_field_attributes_single_value_type" => "IncidentFieldAttributesSingleValueType",
"v2.incident_field_attributes_value_type" => "IncidentFieldAttributesValueType",
"v2.incident_handle_attributes_fields" => "IncidentHandleAttributesFields",
"v2.incident_handle_attributes_request" => "IncidentHandleAttributesRequest",
"v2.incident_handle_attributes_response" => "IncidentHandleAttributesResponse",
"v2.incident_handle_data_request" => "IncidentHandleDataRequest",
"v2.incident_handle_data_response" => "IncidentHandleDataResponse",
"v2.incident_handle_included_item_response" => "IncidentHandleIncludedItemResponse",
"v2.incident_handle_relationship" => "IncidentHandleRelationship",
"v2.incident_handle_relationship_data" => "IncidentHandleRelationshipData",
"v2.incident_handle_relationships" => "IncidentHandleRelationships",
"v2.incident_handle_relationships_request" => "IncidentHandleRelationshipsRequest",
"v2.incident_handle_request" => "IncidentHandleRequest",
"v2.incident_handle_response" => "IncidentHandleResponse",
"v2.incident_handles_response" => "IncidentHandlesResponse",
"v2.incident_handle_type" => "IncidentHandleType",
"v2.incident_impact_attributes" => "IncidentImpactAttributes",
"v2.incident_impact_create_attributes" => "IncidentImpactCreateAttributes",
"v2.incident_impact_create_data" => "IncidentImpactCreateData",
Expand Down
Loading
Loading