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

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions examples/v2/synthetics/GetApiMultistepSubtestParents.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get parent tests for a subtest returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_api_multistep_subtest_parents("public_id")
5 changes: 5 additions & 0 deletions examples/v2/synthetics/GetApiMultistepSubtests.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get available subtests for a multistep test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_api_multistep_subtests("public_id")
5 changes: 5 additions & 0 deletions examples/v2/synthetics/GetSyntheticsTestVersion.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a specific version of a test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_synthetics_test_version("public_id", 9223372036854775807)
5 changes: 5 additions & 0 deletions examples/v2/synthetics/GetTestParentSuites.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get parent suites for a test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_test_parent_suites("public_id")
5 changes: 5 additions & 0 deletions examples/v2/synthetics/ListSyntheticsTestVersions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get version history of a test returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.list_synthetics_test_versions("public_id")
19 changes: 19 additions & 0 deletions examples/v2/synthetics/PatchTestSuite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Patch a test suite returns "OK" response

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

body = DatadogAPIClient::V2::SuiteJsonPatchRequest.new({
data: DatadogAPIClient::V2::SuiteJsonPatchRequestData.new({
attributes: DatadogAPIClient::V2::SuiteJsonPatchRequestDataAttributes.new({
json_patch: [
DatadogAPIClient::V2::JsonPatchOperation.new({
op: DatadogAPIClient::V2::JsonPatchOperationOp::ADD,
path: "/name",
}),
],
}),
type: DatadogAPIClient::V2::SuiteJsonPatchType::SUITES_JSON_PATCH,
}),
})
p api_instance.patch_test_suite("123-abc-456", body)
18 changes: 18 additions & 0 deletions examples/v2/widgets/CreateWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create a widget returns "OK" response

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

body = DatadogAPIClient::V2::CreateOrUpdateWidgetRequest.new({
data: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestData.new({
attributes: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestAttributes.new({
definition: DatadogAPIClient::V2::WidgetDefinition.new({
title: "My Widget",
type: DatadogAPIClient::V2::WidgetType::BAR_CHART,
}),
tags: [],
}),
type: "widgets",
}),
})
p api_instance.create_widget(WidgetExperienceType::CCM_REPORTS, body)
5 changes: 5 additions & 0 deletions examples/v2/widgets/DeleteWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a widget returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new
api_instance.delete_widget(WidgetExperienceType::CCM_REPORTS, "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/widgets/GetWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a widget returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new
p api_instance.get_widget(WidgetExperienceType::CCM_REPORTS, "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/widgets/SearchWidgets.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Search widgets returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::WidgetsAPI.new
p api_instance.search_widgets(WidgetExperienceType::CCM_REPORTS)
18 changes: 18 additions & 0 deletions examples/v2/widgets/UpdateWidget.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Update a widget returns "OK" response

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

body = DatadogAPIClient::V2::CreateOrUpdateWidgetRequest.new({
data: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestData.new({
attributes: DatadogAPIClient::V2::CreateOrUpdateWidgetRequestAttributes.new({
definition: DatadogAPIClient::V2::WidgetDefinition.new({
title: "My Widget",
type: DatadogAPIClient::V2::WidgetType::BAR_CHART,
}),
tags: [],
}),
type: "widgets",
}),
})
p api_instance.update_widget(WidgetExperienceType::CCM_REPORTS, "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
52 changes: 52 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3926,6 +3926,12 @@
"include" => "String",
"body" => "PatchMaintenanceRequest",
},
"v2.GetApiMultistepSubtests" => {
"public_id" => "String",
},
"v2.GetApiMultistepSubtestParents" => {
"public_id" => "String",
},
"v2.SetOnDemandConcurrencyCap" => {
"body" => "OnDemandConcurrencyCapAttributes",
},
Expand All @@ -3949,6 +3955,10 @@
"public_id" => "String",
"body" => "SuiteCreateEditRequest",
},
"v2.PatchTestSuite" => {
"public_id" => "String",
"body" => "SuiteJsonPatchRequest",
},
"v2.DeleteSyntheticsTests" => {
"body" => "DeletedTestsRequestDeleteRequest",
},
Expand All @@ -3965,6 +3975,20 @@
"public_id" => "String",
"body" => "SyntheticsNetworkTestEditRequest",
},
"v2.GetTestParentSuites" => {
"public_id" => "String",
},
"v2.ListSyntheticsTestVersions" => {
"public_id" => "String",
"last_version_number" => "Integer",
"limit" => "Integer",
},
"v2.GetSyntheticsTestVersion" => {
"public_id" => "String",
"version_number" => "Integer",
"include_change_metadata" => "Boolean",
"only_check_existence" => "Boolean",
},
"v2.PatchGlobalVariable" => {
"variable_id" => "String",
"body" => "GlobalVariableJsonPatchRequest",
Expand Down Expand Up @@ -4164,6 +4188,34 @@
"v2.ListUserPermissions" => {
"user_id" => "String",
},
"v2.SearchWidgets" => {
"experience_type" => "WidgetExperienceType",
"filter_widget_type" => "WidgetType",
"filter_creator_handle" => "String",
"filter_is_favorited" => "Boolean",
"filter_title" => "String",
"filter_tags" => "String",
"sort" => "String",
"page_number" => "Integer",
"page_size" => "Integer",
},
"v2.CreateWidget" => {
"experience_type" => "WidgetExperienceType",
"body" => "CreateOrUpdateWidgetRequest",
},
"v2.DeleteWidget" => {
"experience_type" => "WidgetExperienceType",
"uuid" => "UUID",
},
"v2.GetWidget" => {
"experience_type" => "WidgetExperienceType",
"uuid" => "UUID",
},
"v2.UpdateWidget" => {
"experience_type" => "WidgetExperienceType",
"uuid" => "UUID",
"body" => "CreateOrUpdateWidgetRequest",
},
"v2.CreateWorkflow" => {
"body" => "CreateWorkflowRequest",
},
Expand Down
81 changes: 81 additions & 0 deletions features/v2/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get a specific version of a test returns "API error response." response
Given new "GetSyntheticsTestVersion" request
And request contains "public_id" parameter from "REPLACE.ME"
And request contains "version_number" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get a specific version of a test returns "OK" response
Given new "GetSyntheticsTestVersion" request
And request contains "public_id" parameter from "REPLACE.ME"
And request contains "version_number" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get a suite returns "API error response." response
Given new "GetSyntheticsSuite" request
Expand All @@ -147,12 +163,61 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get available subtests for a multistep test returns "OK" response
Given new "GetApiMultistepSubtests" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get parent suites for a test returns "API error response." response
Given new "GetTestParentSuites" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get parent suites for a test returns "OK" response
Given new "GetTestParentSuites" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get parent tests for a subtest returns "API error response." response
Given new "GetApiMultistepSubtestParents" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get parent tests for a subtest returns "OK" response
Given new "GetApiMultistepSubtestParents" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@team:DataDog/synthetics-managing
Scenario: Get the on-demand concurrency cap returns "OK" response
Given new "GetOnDemandConcurrencyCap" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get version history of a test returns "API error response." response
Given new "ListSyntheticsTestVersions" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Get version history of a test returns "OK" response
Given new "ListSyntheticsTestVersions" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Patch a global variable returns "Bad Request" response
Given new "PatchGlobalVariable" request
Expand All @@ -177,6 +242,22 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Patch a test suite returns "API error response." response
Given new "PatchTestSuite" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "suites_json_patch"}}
When the request is sent
Then the response status is 400 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Patch a test suite returns "OK" response
Given new "PatchTestSuite" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "suites_json_patch"}}
When the request is sent
Then the response status is 200 OK

@team:DataDog/synthetics-managing
Scenario: Save new value for on-demand concurrency cap returns "OK" response
Given new "SetOnDemandConcurrencyCap" request
Expand Down
77 changes: 77 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5809,6 +5809,18 @@
"type": "idempotent"
}
},
"GetApiMultistepSubtests": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"GetApiMultistepSubtestParents": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"GetOnDemandConcurrencyCap": {
"tag": "Synthetics",
"undo": {
Expand Down Expand Up @@ -5858,6 +5870,12 @@
"type": "idempotent"
}
},
"PatchTestSuite": {
"tag": "Synthetics",
"undo": {
"type": "idempotent"
}
},
"DeleteSyntheticsTests": {
"tag": "Synthetics",
"undo": {
Expand Down Expand Up @@ -5895,6 +5913,24 @@
"type": "idempotent"
}
},
"GetTestParentSuites": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"ListSyntheticsTestVersions": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"GetSyntheticsTestVersion": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"PatchGlobalVariable": {
"tag": "Synthetics",
"undo": {
Expand Down Expand Up @@ -6356,6 +6392,47 @@
"type": "safe"
}
},
"SearchWidgets": {
"tag": "Widgets",
"undo": {
"type": "safe"
}
},
"CreateWidget": {
"tag": "Widgets",
"undo": {
"operationId": "DeleteWidget",
"parameters": [
{
"name": "experience_type",
"source": "experience_type"
},
{
"name": "uuid",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"DeleteWidget": {
"tag": "Widgets",
"undo": {
"type": "idempotent"
}
},
"GetWidget": {
"tag": "Widgets",
"undo": {
"type": "safe"
}
},
"UpdateWidget": {
"tag": "Widgets",
"undo": {
"type": "safe"
}
},
"CreateWorkflow": {
"tag": "Workflow Automation",
"undo": {
Expand Down
Loading
Loading