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

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions examples/v2/statuspage-integration/CreateStatuspageAccount.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Create the Statuspage account returns "CREATED" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new

body = DatadogAPIClient::V2::StatuspageAccountCreateRequest.new({
data: DatadogAPIClient::V2::StatuspageAccountCreateData.new({
attributes: DatadogAPIClient::V2::StatuspageAccountCreateAttributes.new({
api_key: "00000000-0000-0000-0000-000000000000",
}),
type: DatadogAPIClient::V2::StatuspageAccountType::STATUSPAGE_ACCOUNT,
}),
})
p api_instance.create_statuspage_account(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create a Statuspage URL setting returns "CREATED" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new

body = DatadogAPIClient::V2::StatuspageUrlSettingCreateRequest.new({
data: DatadogAPIClient::V2::StatuspageUrlSettingCreateData.new({
attributes: DatadogAPIClient::V2::StatuspageUrlSettingCreateAttributes.new({
custom_tags: "team:collaboration-integrations,env:prod",
url: "https://example.statuspage.io",
}),
type: DatadogAPIClient::V2::StatuspageUrlSettingType::STATUSPAGE_URL_SETTING,
}),
})
p api_instance.create_statuspage_url_setting(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete the Statuspage account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new
api_instance.delete_statuspage_account()
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a Statuspage URL setting returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new
api_instance.delete_statuspage_url_setting("statuspage_url_setting_id")
5 changes: 5 additions & 0 deletions examples/v2/statuspage-integration/GetStatuspageAccount.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get the Statuspage account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new
p api_instance.get_statuspage_account()
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get all Statuspage URL settings returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new
p api_instance.list_statuspage_url_settings()
14 changes: 14 additions & 0 deletions examples/v2/statuspage-integration/UpdateStatuspageAccount.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Update the Statuspage account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new

body = DatadogAPIClient::V2::StatuspageAccountUpdateRequest.new({
data: DatadogAPIClient::V2::StatuspageAccountUpdateData.new({
attributes: DatadogAPIClient::V2::StatuspageAccountUpdateAttributes.new({
api_key: "00000000-0000-0000-0000-000000000000",
}),
type: DatadogAPIClient::V2::StatuspageAccountType::STATUSPAGE_ACCOUNT,
}),
})
p api_instance.update_statuspage_account(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Update a Statuspage URL setting returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatuspageIntegrationAPI.new

body = DatadogAPIClient::V2::StatuspageUrlSettingUpdateRequest.new({
data: DatadogAPIClient::V2::StatuspageUrlSettingUpdateData.new({
attributes: DatadogAPIClient::V2::StatuspageUrlSettingUpdateAttributes.new({
custom_tags: "team:collaboration-integrations,env:prod",
url: "https://example.statuspage.io",
}),
id: "596da4af-0563-4097-90ff-07230c3f9db3",
type: DatadogAPIClient::V2::StatuspageUrlSettingType::STATUSPAGE_URL_SETTING,
}),
})
p api_instance.update_statuspage_url_setting("statuspage_url_setting_id", body)
16 changes: 16 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3470,6 +3470,22 @@
"v2.ListServiceNowUsers" => {
"instance_id" => "UUID",
},
"v2.UpdateStatuspageAccount" => {
"body" => "StatuspageAccountUpdateRequest",
},
"v2.CreateStatuspageAccount" => {
"body" => "StatuspageAccountCreateRequest",
},
"v2.CreateStatuspageUrlSetting" => {
"body" => "StatuspageUrlSettingCreateRequest",
},
"v2.DeleteStatuspageUrlSetting" => {
"statuspage_url_setting_id" => "String",
},
"v2.UpdateStatuspageUrlSetting" => {
"statuspage_url_setting_id" => "String",
"body" => "StatuspageUrlSettingUpdateRequest",
},
"v2.CreateCloudflareAccount" => {
"body" => "CloudflareAccountCreateRequest",
},
Expand Down
24 changes: 24 additions & 0 deletions features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,30 @@
"tag": "Opsgenie Integration",
"operationId": "CreateOpsgenieService"
},
{
"parameters": [
{
"name": "body",
"value": "{\n \"data\": {\n \"attributes\": {\n \"api_key\": \"00000000-0000-0000-0000-000000000000\"\n },\n \"type\": \"statuspage-account\"\n }\n}"
}
],
"step": "there is a valid \"statuspage_account\" in the system",
"key": "statuspage_account",
"tag": "Statuspage Integration",
"operationId": "CreateStatuspageAccount"
},
{
"parameters": [
{
"name": "body",
"value": "{\n \"data\": {\n \"attributes\": {\n \"url\": \"https://example.statuspage.io\",\n \"custom_tags\": \"team:collaboration-integrations\"\n },\n \"type\": \"statuspage-url-setting\"\n }\n}"
}
],
"step": "there is a valid \"statuspage_url_setting\" in the system",
"key": "statuspage_url_setting",
"tag": "Statuspage Integration",
"operationId": "CreateStatuspageUrlSetting"
},
{
"parameters": [
{
Expand Down
168 changes: 168 additions & 0 deletions features/v2/statuspage_integration.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
@endpoint(statuspage-integration) @endpoint(statuspage-integration-v2)
Feature: Statuspage Integration
Configure your [Datadog Statuspage
integration](https://docs.datadoghq.com/integrations/statuspage/) directly
through the Datadog API.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "StatuspageIntegration" API

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create a Statuspage URL setting returns "Bad Request" response
Given new "CreateStatuspageUrlSetting" request
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create a Statuspage URL setting returns "CREATED" response
Given new "CreateStatuspageUrlSetting" request
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 201 CREATED

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create a Statuspage URL setting returns "Conflict" response
Given new "CreateStatuspageUrlSetting" request
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create the Statuspage account returns "Bad Request" response
Given new "CreateStatuspageAccount" request
And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000"}, "type": "statuspage-account"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create the Statuspage account returns "CREATED" response
Given new "CreateStatuspageAccount" request
And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000"}, "type": "statuspage-account"}}
When the request is sent
Then the response status is 201 CREATED

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Create the Statuspage account returns "Conflict" response
Given new "CreateStatuspageAccount" request
And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000"}, "type": "statuspage-account"}}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete a Statuspage URL setting returns "Bad Request" response
Given new "DeleteStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete a Statuspage URL setting returns "Not Found" response
Given new "DeleteStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete a Statuspage URL setting returns "OK" response
Given new "DeleteStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 OK

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete the Statuspage account returns "Bad Request" response
Given new "DeleteStatuspageAccount" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete the Statuspage account returns "Not Found" response
Given new "DeleteStatuspageAccount" request
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Delete the Statuspage account returns "OK" response
Given new "DeleteStatuspageAccount" request
When the request is sent
Then the response status is 204 OK

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get all Statuspage URL settings returns "Not Found" response
Given new "ListStatuspageUrlSettings" request
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get all Statuspage URL settings returns "OK" response
Given new "ListStatuspageUrlSettings" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get the Statuspage account returns "Not Found" response
Given new "GetStatuspageAccount" request
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Get the Statuspage account returns "OK" response
Given new "GetStatuspageAccount" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update a Statuspage URL setting returns "Bad Request" response
Given new "UpdateStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update a Statuspage URL setting returns "Conflict" response
Given new "UpdateStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update a Statuspage URL setting returns "Not Found" response
Given new "UpdateStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update a Statuspage URL setting returns "OK" response
Given new "UpdateStatuspageUrlSetting" request
And request contains "statuspage_url_setting_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"custom_tags": "team:collaboration-integrations,env:prod", "url": "https://example.statuspage.io"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "statuspage-url-setting"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update the Statuspage account returns "Bad Request" response
Given new "UpdateStatuspageAccount" request
And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000"}, "type": "statuspage-account"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update the Statuspage account returns "Not Found" response
Given new "UpdateStatuspageAccount" request
And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000"}, "type": "statuspage-account"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:Datadog/collaboration-integrations
Scenario: Update the Statuspage account returns "OK" response
Given new "UpdateStatuspageAccount" request
And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000"}, "type": "statuspage-account"}}
When the request is sent
Then the response status is 200 OK
56 changes: 56 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3554,6 +3554,62 @@
"type": "safe"
}
},
"DeleteStatuspageAccount": {
"tag": "Statuspage Integration",
"undo": {
"type": "idempotent"
}
},
"GetStatuspageAccount": {
"tag": "Statuspage Integration",
"undo": {
"type": "safe"
}
},
"UpdateStatuspageAccount": {
"tag": "Statuspage Integration",
"undo": {
"type": "idempotent"
}
},
"CreateStatuspageAccount": {
"tag": "Statuspage Integration",
"undo": {
"operationId": "DeleteStatuspageAccount",
"type": "unsafe"
}
},
"ListStatuspageUrlSettings": {
"tag": "Statuspage Integration",
"undo": {
"type": "safe"
}
},
"CreateStatuspageUrlSetting": {
"tag": "Statuspage Integration",
"undo": {
"operationId": "DeleteStatuspageUrlSetting",
"parameters": [
{
"name": "statuspage_url_setting_id",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"DeleteStatuspageUrlSetting": {
"tag": "Statuspage Integration",
"undo": {
"type": "idempotent"
}
},
"UpdateStatuspageUrlSetting": {
"tag": "Statuspage Integration",
"undo": {
"type": "idempotent"
}
},
"ListIntegrations": {
"tag": "Integrations",
"undo": {
Expand Down
Loading
Loading