For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ko/api/latest/synthetics/patch-a-test-suite.md. A documentation index is available at /llms.txt.
Language
Datadog site

테스트 모음 패치

PATCHhttps://api.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.us3.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.us5.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.datadoghq.eu/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.ap1.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.ap2.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.uk1.datadoghq.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.ddog-gov.com/api/v2/synthetics/suites/{public_id}/jsonpatchhttps://api.us2.ddog-gov.com/api/v2/synthetics/suites/{public_id}/jsonpatch

개요

JSON Patch(RFC 6902)를 사용하여 Synthetic 테스트 모음을 패치합니다. 부분 업데이트를 사용하여 테스트 모음의 특정 필드만 수정합니다.

일반적인 작업은 다음과 같습니다.

  • 필드 값 바꾸기: {"op": "replace", "path": "/name", "value": "new_name"}
  • 태그 추가/업데이트: {"op": "add", "path": "/tags/-", "value": "new_tag"}
  • 필드 제거: {"op": "remove", "path": "/message"}

This endpoint requires any of the following permissions:

  • synthetics_write
  • synthetics_create_edit_trigger

OAuth apps require the synthetics_write authorization scope to access this endpoint.

인수

경로 파라미터

이름
유형
설명
public_id [required]
string

The public ID of the Synthetic test suite to patch.

요청

Body Data (required)

적용할 작업이 포함된 JSON Patch 문서입니다.

항목
유형
설명
data [required]
object

Synthetic 테스트 모음에 대한 JSON Patch 요청입니다.

응답

OK

Synthetics suite response

항목
유형
설명
data
object

Synthetics suite response data

코드 예시

# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF
# Path parameters
export public_id="123-abc-456"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X PATCH "https://api.${DD_SITE}/api/v2/synthetics/suites/${public_id}/jsonpatch" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "json_patch": [
        {
          "op": "add",
          "path": "/name"
        }
      ]
    },
    "type": "suites_json_patch"
  }
}
EOF