Sha256: 01582abda6018fe957b9aa8cfd33cabd39ca8078a7827aea5195858c12666e82

Contents?: true

Size: 772 Bytes

Versions: 12

Compression:

Stored size: 772 Bytes

Contents

# Patch a Synthetic test returns "OK" response

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

# there is a valid "synthetics_api_test" in the system
SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]

body = DatadogAPIClient::V1::SyntheticsPatchTestBody.new({
  data: [
    DatadogAPIClient::V1::SyntheticsPatchTestOperation.new({
      op: DatadogAPIClient::V1::SyntheticsPatchTestOperationName::REPLACE,
      path: "/name",
      value: "New test name",
    }),
    DatadogAPIClient::V1::SyntheticsPatchTestOperation.new({
      op: DatadogAPIClient::V1::SyntheticsPatchTestOperationName::REMOVE,
      path: "/config/assertions/0",
    }),
  ],
})
p api_instance.patch_test(SYNTHETICS_API_TEST_PUBLIC_ID, body)

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.28.1 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.27.1 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.26.1 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.26.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.25.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.24.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.22.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.21.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.20.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.19.0 examples/v1/synthetics/PatchTest.rb
datadog_api_client-2.18.0 examples/v1/synthetics/PatchTest.rb