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
472 changes: 472 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions examples/v2/incidents/CreateIncidentTimestampOverride.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create a timestamp override for an incident returns "Created" response

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

body = DatadogAPIClient::V2::IncidentTimestampOverrideCreateRequest.new({
data: DatadogAPIClient::V2::IncidentTimestampOverrideCreateData.new({
attributes: DatadogAPIClient::V2::IncidentTimestampOverrideCreateAttributes.new({
timestamp_type: DatadogAPIClient::V2::TimestampType::CREATED,
timestamp_value: "2024-12-29T10:00:00Z",
}),
type: DatadogAPIClient::V2::IncidentsTimestampOverridesType::INCIDENTS_TIMESTAMP_OVERRIDES,
}),
})
p api_instance.create_incident_timestamp_override("9cecfde8-e35d-4387-8985-9b30dcb9cb1c", body)
8 changes: 8 additions & 0 deletions examples/v2/incidents/DeleteIncidentTimestampOverride.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete a timestamp override for an incident returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_incident_timestamp_override".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
api_instance.delete_incident_timestamp_override("9cecfde8-e35d-4387-8985-9b30dcb9cb1c", "6f48a86f-9a39-4bcf-a76b-9a1b20188995")
8 changes: 8 additions & 0 deletions examples/v2/incidents/ListIncidentTimestampOverrides.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List timestamp overrides for an incident returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_incident_timestamp_overrides".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.list_incident_timestamp_overrides("9cecfde8-e35d-4387-8985-9b30dcb9cb1c")
17 changes: 17 additions & 0 deletions examples/v2/incidents/UpdateIncidentTimestampOverride.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Update a timestamp override for an incident returns "OK" response

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

body = DatadogAPIClient::V2::IncidentTimestampOverridePatchRequest.new({
data: DatadogAPIClient::V2::IncidentTimestampOverridePatchData.new({
attributes: DatadogAPIClient::V2::IncidentTimestampOverridePatchAttributes.new({
timestamp_value: "2024-12-29T11:00:00Z",
}),
type: DatadogAPIClient::V2::IncidentsTimestampOverridesType::INCIDENTS_TIMESTAMP_OVERRIDES,
}),
})
p api_instance.update_incident_timestamp_override("9cecfde8-e35d-4387-8985-9b30dcb9cb1c", "6f48a86f-9a39-4bcf-a76b-9a1b20188995", body)
20 changes: 20 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,26 @@
"todo_id" => "String",
"body" => "IncidentTodoPatchRequest",
},
"v2.ListIncidentTimestampOverrides" => {
"incident_id" => "UUID",
"include" => "String",
"include_deleted" => "Boolean",
},
"v2.CreateIncidentTimestampOverride" => {
"incident_id" => "UUID",
"include" => "String",
"body" => "IncidentTimestampOverrideCreateRequest",
},
"v2.DeleteIncidentTimestampOverride" => {
"incident_id" => "UUID",
"timestamp_override_id" => "UUID",
},
"v2.UpdateIncidentTimestampOverride" => {
"incident_id" => "UUID",
"timestamp_override_id" => "UUID",
"include" => "String",
"body" => "IncidentTimestampOverridePatchRequest",
},
"v2.ListAWSAccounts" => {
"aws_account_id" => "String",
},
Expand Down
91 changes: 91 additions & 0 deletions features/v2/incidents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,33 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:Datadog/incident-app
Scenario: Create a timestamp override for an incident returns "Bad Request" response
Given operation "CreateIncidentTimestampOverride" enabled
And new "CreateIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"timestamp_type": "created", "timestamp_value": "2024-12-29T10:00:00Z"}, "type": "incidents_timestamp_overrides"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/incident-app
Scenario: Create a timestamp override for an incident returns "Created" response
Given operation "CreateIncidentTimestampOverride" enabled
And new "CreateIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"timestamp_type": "created", "timestamp_value": "2024-12-29T10:00:00Z"}, "type": "incidents_timestamp_overrides"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:Datadog/incident-app
Scenario: Create a timestamp override for an incident returns "Not Found" response
Given operation "CreateIncidentTimestampOverride" enabled
And new "CreateIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"timestamp_type": "created", "timestamp_value": "2024-12-29T10:00:00Z"}, "type": "incidents_timestamp_overrides"}}
When the request is sent
Then the response status is 404 Not Found

@skip @team:DataDog/incident-app
Scenario: Create an incident impact returns "Bad Request" response
Given operation "CreateIncidentImpact" enabled
Expand Down Expand Up @@ -330,6 +357,24 @@ Feature: Incidents
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/incident-app
Scenario: Delete a timestamp override for an incident returns "No Content" response
Given operation "DeleteIncidentTimestampOverride" enabled
And new "DeleteIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:Datadog/incident-app
Scenario: Delete a timestamp override for an incident returns "Not Found" response
Given operation "DeleteIncidentTimestampOverride" enabled
And new "DeleteIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Delete an existing incident returns "Bad Request" response
Given operation "DeleteIncident" enabled
Expand Down Expand Up @@ -1018,6 +1063,22 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:Datadog/incident-app
Scenario: List timestamp overrides for an incident returns "Not Found" response
Given operation "ListIncidentTimestampOverrides" enabled
And new "ListIncidentTimestampOverrides" request
And request contains "incident_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/incident-app
Scenario: List timestamp overrides for an incident returns "OK" response
Given operation "ListIncidentTimestampOverrides" enabled
And new "ListIncidentTimestampOverrides" request
And request contains "incident_id" parameter from "REPLACE.ME"
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 @@ -1066,6 +1127,36 @@ Feature: Incidents
Then the response status is 200 OK
And the response has 3 items

@generated @skip @team:Datadog/incident-app
Scenario: Update a timestamp override for an incident returns "Bad Request" response
Given operation "UpdateIncidentTimestampOverride" enabled
And new "UpdateIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"timestamp_value": "2024-12-29T11:00:00Z"}, "type": "incidents_timestamp_overrides"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/incident-app
Scenario: Update a timestamp override for an incident returns "Not Found" response
Given operation "UpdateIncidentTimestampOverride" enabled
And new "UpdateIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"timestamp_value": "2024-12-29T11:00:00Z"}, "type": "incidents_timestamp_overrides"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/incident-app
Scenario: Update a timestamp override for an incident returns "OK" response
Given operation "UpdateIncidentTimestampOverride" enabled
And new "UpdateIncidentTimestampOverride" request
And request contains "incident_id" parameter from "REPLACE.ME"
And request contains "timestamp_override_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"timestamp_value": "2024-12-29T11:00:00Z"}, "type": "incidents_timestamp_overrides"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Update an existing incident integration metadata returns "Bad Request" response
Given operation "UpdateIncidentIntegration" enabled
Expand Down
24 changes: 24 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,30 @@
"type": "idempotent"
}
},
"ListIncidentTimestampOverrides": {
"tag": "Incidents",
"undo": {
"type": "safe"
}
},
"CreateIncidentTimestampOverride": {
"tag": "Incidents",
"undo": {
"type": "unsafe"
}
},
"DeleteIncidentTimestampOverride": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"UpdateIncidentTimestampOverride": {
"tag": "Incidents",
"undo": {
"type": "idempotent"
}
},
"ListAWSAccounts": {
"tag": "AWS Integration",
"undo": {
Expand Down
4 changes: 4 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def initialize
"v2.create_incident_notification_template": false,
"v2.create_incident_postmortem_attachment": false,
"v2.create_incident_postmortem_template": false,
"v2.create_incident_timestamp_override": false,
"v2.create_incident_todo": false,
"v2.create_incident_type": false,
"v2.delete_global_incident_handle": false,
Expand All @@ -266,6 +267,7 @@ def initialize
"v2.delete_incident_notification_rule": false,
"v2.delete_incident_notification_template": false,
"v2.delete_incident_postmortem_template": false,
"v2.delete_incident_timestamp_override": false,
"v2.delete_incident_todo": false,
"v2.delete_incident_type": false,
"v2.get_global_incident_settings": false,
Expand All @@ -283,6 +285,7 @@ def initialize
"v2.list_incident_notification_templates": false,
"v2.list_incident_postmortem_templates": false,
"v2.list_incidents": false,
"v2.list_incident_timestamp_overrides": false,
"v2.list_incident_todos": false,
"v2.list_incident_types": false,
"v2.search_incidents": false,
Expand All @@ -294,6 +297,7 @@ def initialize
"v2.update_incident_notification_rule": false,
"v2.update_incident_notification_template": false,
"v2.update_incident_postmortem_template": false,
"v2.update_incident_timestamp_override": false,
"v2.update_incident_todo": false,
"v2.update_incident_type": false,
"v2.create_jira_issue_template": false,
Expand Down
17 changes: 17 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2787,6 +2787,7 @@ def overrides
"v2.incident_service_update_request" => "IncidentServiceUpdateRequest",
"v2.incident_severity" => "IncidentSeverity",
"v2.incidents_response" => "IncidentsResponse",
"v2.incidents_timestamp_overrides_type" => "IncidentsTimestampOverridesType",
"v2.incident_team_create_attributes" => "IncidentTeamCreateAttributes",
"v2.incident_team_create_data" => "IncidentTeamCreateData",
"v2.incident_team_create_request" => "IncidentTeamCreateRequest",
Expand All @@ -2804,6 +2805,17 @@ def overrides
"v2.incident_timeline_cell_markdown_content_type" => "IncidentTimelineCellMarkdownContentType",
"v2.incident_timeline_cell_markdown_create_attributes" => "IncidentTimelineCellMarkdownCreateAttributes",
"v2.incident_timeline_cell_markdown_create_attributes_content" => "IncidentTimelineCellMarkdownCreateAttributesContent",
"v2.incident_timestamp_override_attributes" => "IncidentTimestampOverrideAttributes",
"v2.incident_timestamp_override_create_attributes" => "IncidentTimestampOverrideCreateAttributes",
"v2.incident_timestamp_override_create_data" => "IncidentTimestampOverrideCreateData",
"v2.incident_timestamp_override_create_request" => "IncidentTimestampOverrideCreateRequest",
"v2.incident_timestamp_override_data" => "IncidentTimestampOverrideData",
"v2.incident_timestamp_override_patch_attributes" => "IncidentTimestampOverridePatchAttributes",
"v2.incident_timestamp_override_patch_data" => "IncidentTimestampOverridePatchData",
"v2.incident_timestamp_override_patch_request" => "IncidentTimestampOverridePatchRequest",
"v2.incident_timestamp_override_relationships" => "IncidentTimestampOverrideRelationships",
"v2.incident_timestamp_override_response" => "IncidentTimestampOverrideResponse",
"v2.incident_timestamp_overrides_response" => "IncidentTimestampOverridesResponse",
"v2.incident_todo_anonymous_assignee" => "IncidentTodoAnonymousAssignee",
"v2.incident_todo_anonymous_assignee_source" => "IncidentTodoAnonymousAssigneeSource",
"v2.incident_todo_assignee" => "IncidentTodoAssignee",
Expand Down Expand Up @@ -4986,6 +4998,9 @@ def overrides
"v2.timeseries_response" => "TimeseriesResponse",
"v2.timeseries_response_attributes" => "TimeseriesResponseAttributes",
"v2.timeseries_response_series" => "TimeseriesResponseSeries",
"v2.timestamp_override_user_relationship" => "TimestampOverrideUserRelationship",
"v2.timestamp_override_user_relationship_data" => "TimestampOverrideUserRelationshipData",
"v2.timestamp_type" => "TimestampType",
"v2.token_type" => "TokenType",
"v2.trigger" => "Trigger",
"v2.trigger_rate_limit" => "TriggerRateLimit",
Expand Down Expand Up @@ -5097,6 +5112,8 @@ def overrides
"v2.user_create_attributes" => "UserCreateAttributes",
"v2.user_create_data" => "UserCreateData",
"v2.user_create_request" => "UserCreateRequest",
"v2.user_included" => "UserIncluded",
"v2.user_included_attributes" => "UserIncludedAttributes",
"v2.user_invitation_data" => "UserInvitationData",
"v2.user_invitation_data_attributes" => "UserInvitationDataAttributes",
"v2.user_invitation_relationships" => "UserInvitationRelationships",
Expand Down
Loading
Loading