Delete LLM Observability data

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/llm-obs/deletion/data/llmobshttps://api.ap2.datadoghq.com/api/v2/llm-obs/deletion/data/llmobshttps://api.datadoghq.eu/api/v2/llm-obs/deletion/data/llmobshttps://api.ddog-gov.com/api/v2/llm-obs/deletion/data/llmobshttps://api.us2.ddog-gov.com/api/v2/llm-obs/deletion/data/llmobshttps://api.datadoghq.com/api/v2/llm-obs/deletion/data/llmobshttps://api.us3.datadoghq.com/api/v2/llm-obs/deletion/data/llmobshttps://api.us5.datadoghq.com/api/v2/llm-obs/deletion/data/llmobs

Overview

Submit a request to delete LLM Observability span data matching a trace ID filter within a specified time range.

Request

Body Data (required)

Data deletion request payload.

Expand All

Field

Type

Description

data [required]

object

Data object for an LLM Observability data deletion request.

attributes [required]

object

Attributes for an LLM Observability data deletion request.

delay

int64

Optional delay in seconds before the deletion is executed.

from [required]

int64

Start of the deletion time range in milliseconds since Unix epoch.

query [required]

object

Query filters selecting the data to delete. Must include a query key with an @trace_id filter.

<any-key>

string

to [required]

int64

End of the deletion time range in milliseconds since Unix epoch.

type [required]

enum

Resource type for an LLM Observability data deletion request. Allowed enum values: create_deletion_req

{
  "data": {
    "attributes": {
      "delay": 0,
      "from": 1705314600000,
      "query": {
        "<any-key>": "string"
      },
      "to": 1705315200000
    },
    "type": "create_deletion_req"
  }
}

Response

Accepted

Response containing details of a submitted LLM Observability data deletion request.

Expand All

Field

Type

Description

data [required]

object

Data object for an LLM Observability data deletion response.

attributes [required]

object

Attributes of a submitted LLM Observability data deletion request.

created_at [required]

date-time

Timestamp when the deletion request was created.

created_by [required]

string

UUID of the user who created the deletion request.

from_time [required]

int64

Start of the deletion time range in milliseconds since Unix epoch.

org_id [required]

int64

ID of the organization that submitted the deletion request.

product [required]

string

Product name for the deletion request.

query [required]

string

The query string used to select data for deletion.

to_time [required]

int64

End of the deletion time range in milliseconds since Unix epoch.

id [required]

string

Unique identifier of the deletion request.

type [required]

enum

Resource type for an LLM Observability data deletion response. Allowed enum values: deletion_request

{
  "data": {
    "attributes": {
      "created_at": "2024-01-15T10:30:00Z",
      "created_by": "user-uuid-1234",
      "from_time": 1705314600000,
      "org_id": 12345,
      "product": "llmobs",
      "query": "@trace_id:abc123def456",
      "to_time": 1705315200000
    },
    "id": "msg-abc123",
    "type": "deletion_request"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Unauthorized

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

                  ## default
# 

# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/llm-obs/deletion/data/llmobs" \ -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": 1705314600000, "query": { "query": "@trace_id:abc123def456" }, "to": 1705315200000 }, "type": "create_deletion_req" } } EOF