이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.

Data Deletion

The Data Deletion API allows the user to target and delete data from the allowed products. It’s currently enabled for Logs and RUM and depends on logs_delete_data and rum_delete_data permissions respectively.

POST https://api.ap1.datadoghq.com/api/v2/deletion/data/{product}https://api.datadoghq.eu/api/v2/deletion/data/{product}https://api.ddog-gov.com/api/v2/deletion/data/{product}https://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}

개요

Creates a data deletion request by providing a query and a time frame targeting the proper data. This endpoint requires any of the following permissions:

  • rum_delete_data
  • logs_delete_data

  • 인수

    경로 파라미터

    이름

    유형

    설명

    product [required]

    string

    Name of the product to be deleted, either logs or rum.

    요청

    Body Data (required)

    Expand All

    항목

    유형

    설명

    data [required]

    object

    Data needed to create a data deletion request.

    attributes [required]

    object

    Attributes for creating a data deletion request.

    from [required]

    int64

    Start of requested time window, milliseconds since Unix epoch.

    indexes

    [string]

    List of indexes for the search. If not provided, the search is performed in all indexes.

    query [required]

    object

    Query for creating a data deletion request.

    <any-key>

    string

    to [required]

    int64

    End of requested time window, milliseconds since Unix epoch.

    {
      "data": {
        "attributes": {
          "from": 1672527600000,
          "indexes": [
            "index-1",
            "index-2"
          ],
          "query": {
            "host": "abc",
            "service": "xyz"
          },
          "to": 1704063600000
        }
      }
    }

    응답

    OK

    The response from the create data deletion request endpoint.

    Expand All

    항목

    유형

    설명

    data

    object

    The created data deletion request information.

    attributes [required]

    object

    Deletion attribute for data deletion response.

    created_at [required]

    string

    Creation time of the deletion request.

    created_by [required]

    string

    User who created the deletion request.

    from_time [required]

    int64

    Start of requested time window, milliseconds since Unix epoch.

    indexes

    [string]

    List of indexes for the search. If not provided, the search is performed in all indexes.

    is_created [required]

    boolean

    Whether the deletion request is fully created or not.

    org_id [required]

    int64

    Organization ID.

    product [required]

    string

    Product name.

    query [required]

    string

    Query for creating a data deletion request.

    starting_at [required]

    string

    Starting time of the process to delete the requested data.

    status [required]

    string

    Status of the deletion request.

    to_time [required]

    int64

    End of requested time window, milliseconds since Unix epoch.

    total_unrestricted [required]

    int64

    Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.

    updated_at [required]

    string

    Update time of the deletion request.

    id [required]

    string

    The ID of the created data deletion request.

    type [required]

    string

    The type of the request created.

    meta

    object

    The metadata of the data deletion response.

    count_product

    object

    The total deletion requests created by product.

    <any-key>

    int64

    count_status

    object

    The total deletion requests created by status.

    <any-key>

    int64

    next_page

    string

    The next page when searching deletion requests created in the current organization.

    product

    string

    The product of the deletion request.

    request_status

    string

    The status of the executed request.

    {
      "data": {
        "attributes": {
          "created_at": "2024-01-01T00:00:00.000000Z",
          "created_by": "test.user@datadoghq.com",
          "from_time": 1672527600000,
          "indexes": [
            "index-1",
            "index-2"
          ],
          "is_created": true,
          "org_id": 321813,
          "product": "logs",
          "query": "service:xyz host:abc",
          "starting_at": "2024-01-01T02:00:00.000000Z",
          "status": "pending",
          "to_time": 1704063600000,
          "total_unrestricted": 100,
          "updated_at": "2024-01-01T00:00:00.000000Z"
        },
        "id": "1",
        "type": "deletion_request"
      },
      "meta": {
        "count_product": {
          "<any-key>": "integer"
        },
        "count_status": {
          "<any-key>": "integer"
        },
        "next_page": "cGFnZTI=",
        "product": "logs",
        "request_status": "canceled"
      }
    }

    Bad Request

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Forbidden

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Precondition failed error

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Internal server error

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    코드 사례

                              # Path parameters
    export product="CHANGE_ME"
    # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deletion/data/${product}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "from": 1672527600000, "indexes": [ "index-1", "index-2" ], "query": { "host": "abc", "service": "xyz" }, "to": 1704063600000 } } } EOF

    PUT https://api.ap1.datadoghq.com/api/v2/deletion/requests/{id}/cancelhttps://api.datadoghq.eu/api/v2/deletion/requests/{id}/cancelhttps://api.ddog-gov.com/api/v2/deletion/requests/{id}/cancelhttps://api.datadoghq.com/api/v2/deletion/requests/{id}/cancelhttps://api.us3.datadoghq.com/api/v2/deletion/requests/{id}/cancelhttps://api.us5.datadoghq.com/api/v2/deletion/requests/{id}/cancel

    개요

    Cancels a data deletion request by providing its ID. This endpoint requires any of the following permissions:

  • rum_delete_data
  • logs_delete_data

  • 인수

    경로 파라미터

    이름

    유형

    설명

    id [required]

    string

    ID of the deletion request.

    응답

    OK

    The response from the cancel data deletion request endpoint.

    Expand All

    항목

    유형

    설명

    data

    object

    The created data deletion request information.

    attributes [required]

    object

    Deletion attribute for data deletion response.

    created_at [required]

    string

    Creation time of the deletion request.

    created_by [required]

    string

    User who created the deletion request.

    from_time [required]

    int64

    Start of requested time window, milliseconds since Unix epoch.

    indexes

    [string]

    List of indexes for the search. If not provided, the search is performed in all indexes.

    is_created [required]

    boolean

    Whether the deletion request is fully created or not.

    org_id [required]

    int64

    Organization ID.

    product [required]

    string

    Product name.

    query [required]

    string

    Query for creating a data deletion request.

    starting_at [required]

    string

    Starting time of the process to delete the requested data.

    status [required]

    string

    Status of the deletion request.

    to_time [required]

    int64

    End of requested time window, milliseconds since Unix epoch.

    total_unrestricted [required]

    int64

    Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.

    updated_at [required]

    string

    Update time of the deletion request.

    id [required]

    string

    The ID of the created data deletion request.

    type [required]

    string

    The type of the request created.

    meta

    object

    The metadata of the data deletion response.

    count_product

    object

    The total deletion requests created by product.

    <any-key>

    int64

    count_status

    object

    The total deletion requests created by status.

    <any-key>

    int64

    next_page

    string

    The next page when searching deletion requests created in the current organization.

    product

    string

    The product of the deletion request.

    request_status

    string

    The status of the executed request.

    {
      "data": {
        "attributes": {
          "created_at": "2024-01-01T00:00:00.000000Z",
          "created_by": "test.user@datadoghq.com",
          "from_time": 1672527600000,
          "indexes": [
            "index-1",
            "index-2"
          ],
          "is_created": true,
          "org_id": 321813,
          "product": "logs",
          "query": "service:xyz host:abc",
          "starting_at": "2024-01-01T02:00:00.000000Z",
          "status": "pending",
          "to_time": 1704063600000,
          "total_unrestricted": 100,
          "updated_at": "2024-01-01T00:00:00.000000Z"
        },
        "id": "1",
        "type": "deletion_request"
      },
      "meta": {
        "count_product": {
          "<any-key>": "integer"
        },
        "count_status": {
          "<any-key>": "integer"
        },
        "next_page": "cGFnZTI=",
        "product": "logs",
        "request_status": "canceled"
      }
    }

    Bad Request

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Forbidden

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Precondition failed error

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Internal server error

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    코드 사례

                      # Path parameters
    export id="CHANGE_ME"
    # Curl command
    curl -X PUT "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deletion/requests/${id}/cancel" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/deletion/requestshttps://api.datadoghq.eu/api/v2/deletion/requestshttps://api.ddog-gov.com/api/v2/deletion/requestshttps://api.datadoghq.com/api/v2/deletion/requestshttps://api.us3.datadoghq.com/api/v2/deletion/requestshttps://api.us5.datadoghq.com/api/v2/deletion/requests

    개요

    Gets a list of data deletion requests based on several filter parameters. This endpoint requires any of the following permissions:

  • rum_delete_data
  • logs_delete_data

  • 인수

    쿼리 문자열

    이름

    유형

    설명

    next_page

    string

    The next page of the previous search. If the next_page parameter is included, the rest of the query elements are ignored.

    product

    string

    Retrieve only the requests related to the given product.

    query

    string

    Retrieve only the requests that matches the given query.

    status

    string

    Retrieve only the requests with the given status.

    page_size

    integer

    Sets the page size of the search.

    응답

    OK

    The response from the get data deletion requests endpoint.

    Expand All

    항목

    유형

    설명

    data

    [object]

    The list of data deletion requests that matches the query.

    attributes [required]

    object

    Deletion attribute for data deletion response.

    created_at [required]

    string

    Creation time of the deletion request.

    created_by [required]

    string

    User who created the deletion request.

    from_time [required]

    int64

    Start of requested time window, milliseconds since Unix epoch.

    indexes

    [string]

    List of indexes for the search. If not provided, the search is performed in all indexes.

    is_created [required]

    boolean

    Whether the deletion request is fully created or not.

    org_id [required]

    int64

    Organization ID.

    product [required]

    string

    Product name.

    query [required]

    string

    Query for creating a data deletion request.

    starting_at [required]

    string

    Starting time of the process to delete the requested data.

    status [required]

    string

    Status of the deletion request.

    to_time [required]

    int64

    End of requested time window, milliseconds since Unix epoch.

    total_unrestricted [required]

    int64

    Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.

    updated_at [required]

    string

    Update time of the deletion request.

    id [required]

    string

    The ID of the created data deletion request.

    type [required]

    string

    The type of the request created.

    meta

    object

    The metadata of the data deletion response.

    count_product

    object

    The total deletion requests created by product.

    <any-key>

    int64

    count_status

    object

    The total deletion requests created by status.

    <any-key>

    int64

    next_page

    string

    The next page when searching deletion requests created in the current organization.

    product

    string

    The product of the deletion request.

    request_status

    string

    The status of the executed request.

    {
      "data": [
        {
          "attributes": {
            "created_at": "2024-01-01T00:00:00.000000Z",
            "created_by": "test.user@datadoghq.com",
            "from_time": 1672527600000,
            "indexes": [
              "index-1",
              "index-2"
            ],
            "is_created": true,
            "org_id": 321813,
            "product": "logs",
            "query": "service:xyz host:abc",
            "starting_at": "2024-01-01T02:00:00.000000Z",
            "status": "pending",
            "to_time": 1704063600000,
            "total_unrestricted": 100,
            "updated_at": "2024-01-01T00:00:00.000000Z"
          },
          "id": "1",
          "type": "deletion_request"
        }
      ],
      "meta": {
        "count_product": {
          "<any-key>": "integer"
        },
        "count_status": {
          "<any-key>": "integer"
        },
        "next_page": "cGFnZTI=",
        "product": "logs",
        "request_status": "canceled"
      }
    }

    Bad Request

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Forbidden

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Too many requests

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    Internal server error

    API error response.

    Expand All

    항목

    유형

    설명

    errors [required]

    [string]

    A list of errors.

    {
      "errors": [
        "Bad Request"
      ]
    }

    코드 사례

                      # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/deletion/requests" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"