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/data-deletion/creates-a-data-deletion-request.md. A documentation index is available at /llms.txt.
Language
Datadog site

데이터 삭제 요청 생성

POSThttps://api.datadoghq.com/api/v2/deletion/data/{product}https://api.us3.datadoghq.com/api/v2/deletion/data/{product}https://api.us5.datadoghq.com/api/v2/deletion/data/{product}https://api.datadoghq.eu/api/v2/deletion/data/{product}https://api.ap1.datadoghq.com/api/v2/deletion/data/{product}https://api.ap2.datadoghq.com/api/v2/deletion/data/{product}https://api.uk1.datadoghq.com/api/v2/deletion/data/{product}https://api.ddog-gov.com/api/v2/deletion/data/{product}https://api.us2.ddog-gov.com/api/v2/deletion/data/{product}

개요

적절한 데이터를 대상으로 하는 쿼리와 기간을 제공하여 데이터 삭제 요청을 생성합니다.

This endpoint requires the logs_delete_data permission.

인수

경로 파라미터

이름
유형
설명
product [required]
string

Name of the product to be deleted. Only logs is supported.

요청

Body Data (required)

항목
유형
설명
data [required]
object

데이터 삭제 요청을 생성하는 데 필요한 객체입니다.

응답

OK

The response from the create data deletion request endpoint.

항목
유형
설명
data
object

The created data deletion request information.

meta
object

The metadata of the data deletion response.

코드 예시

Creates a data deletion request returns "OK" response
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF
# Path parameters
export product="CHANGE_ME"

# 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 POST "https://api.${DD_SITE}/api/v2/deletion/data/${product}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "displayed_total": 100,
      "from": 1672527600000,
      "indexes": [
        "test-index",
        "test-index-2"
      ],
      "query": {
        "host": "abc",
        "service": "xyz"
      },
      "to": 1704063600000
    },
    "type": "create_deletion_req"
  }
}
EOF