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/annotations/update-an-annotation.md. A documentation index is available at /llms.txt.
Language
Datadog site

주석 업데이트

경고Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
PUThttps://api.datadoghq.com/api/v2/annotation/{annotation_id}https://api.us3.datadoghq.com/api/v2/annotation/{annotation_id}https://api.us5.datadoghq.com/api/v2/annotation/{annotation_id}https://api.datadoghq.eu/api/v2/annotation/{annotation_id}https://api.ap1.datadoghq.com/api/v2/annotation/{annotation_id}https://api.ap2.datadoghq.com/api/v2/annotation/{annotation_id}https://api.uk1.datadoghq.com/api/v2/annotation/{annotation_id}https://api.ddog-gov.com/api/v2/annotation/{annotation_id}https://api.us2.ddog-gov.com/api/v2/annotation/{annotation_id}

개요

기존 주석을 업데이트합니다. 유효한 color 값: gray, blue, purple, green, yellow, red. 유효한 type 값: pointInTime(단일 시점 표시) 또는 timeRegion(범위를 포괄하며 end_time이 필요함).

인수

경로 파라미터

이름
유형
설명
annotation_id [required]
string

The ID of the annotation.

요청

Body Data (required)

업데이트된 주석 페이로드입니다.

항목
유형
설명
data [required]
object

주석 업데이트를 위한 요청 본문입니다.

응답

OK

Response containing a single annotation.

항목
유형
설명
data [required]
object

A single annotation resource.

코드 예시

Update an annotation returns "OK" response
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF
# Path parameters
export annotation_id="00000000-0000-0000-0000-000000000000"

# 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 PUT "https://api.${DD_SITE}/api/v2/annotation/${annotation_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "color": "green",
      "description": "Updated annotation.",
      "page_id": "dashboard:abc-def-xyz",
      "start_time": 1704067200000,
      "type": "pointInTime"
    },
    "type": "annotation"
  }
}
EOF