---
title: Get an annotated queue interaction
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Agent Observability
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get an annotated queue interaction{% #get-an-annotated-queue-interaction %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}  |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id} |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id} |

### Overview

Retrieve an interaction, its annotations, and a page of related events from an annotation queue.

### Arguments

#### Path Parameters

| Name                             | Type   | Description                                         |
| -------------------------------- | ------ | --------------------------------------------------- |
| queue_id [*required*]       | string | The ID of the Agent Observability annotation queue. |
| interaction_id [*required*] | string | The ID of the interaction in the annotation queue.  |

#### Query Strings

| Name   | Type    | Description                                                            |
| ------ | ------- | ---------------------------------------------------------------------- |
| limit  | integer | Maximum number of events to return. Defaults to 10.                    |
| cursor | string  | Cursor from the previous response to retrieve the next page of events. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing a single annotated interaction and its related events.

| Parent field          | Field                                   | Type          | Description                                                                                                                                                                                                           |
| --------------------- | --------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                       | data [*required*]                  | object        | Data object for a single annotated interaction.                                                                                                                                                                       |
| data                  | attributes [*required*]            | object        | Attributes containing an annotated interaction and its related events.                                                                                                                                                |
| attributes            | annotated_interaction [*required*] |  <oneOf> | An interaction with its associated annotations.                                                                                                                                                                       |
| annotated_interaction | Object 1                                | object        | A trace, experiment trace, or session interaction with its associated annotations.                                                                                                                                    |
| Object 1              | annotations [*required*]           | [object]      | List of annotations for this interaction.                                                                                                                                                                             |
| annotations           | created_at [*required*]            | date-time     | Timestamp when the annotation was created.                                                                                                                                                                            |
| annotations           | created_by [*required*]            | string        | Identifier of the user who created the annotation.                                                                                                                                                                    |
| annotations           | id [*required*]                    | string        | Unique identifier of the annotation.                                                                                                                                                                                  |
| annotations           | interaction_id [*required*]        | string        | Identifier of the interaction this annotation belongs to.                                                                                                                                                             |
| annotations           | label_values [*required*]          | object        | Label values for this annotation.                                                                                                                                                                                     |
| annotations           | modified_at [*required*]           | date-time     | Timestamp when the annotation was last modified.                                                                                                                                                                      |
| annotations           | modified_by [*required*]           | string        | Identifier of the user who last modified the annotation.                                                                                                                                                              |
| Object 1              | can_annotate [*required*]          | boolean       | Whether the current caller can annotate this interaction.                                                                                                                                                             |
| Object 1              | content_id [*required*]            | string        | Upstream entity identifier supplied by the caller.                                                                                                                                                                    |
| Object 1              | created_at [*required*]            | date-time     | Timestamp when the interaction was added to the queue.                                                                                                                                                                |
| Object 1              | id [*required*]                    | string        | Unique identifier of the interaction.                                                                                                                                                                                 |
| Object 1              | modified_at [*required*]           | date-time     | Timestamp when the interaction was last updated.                                                                                                                                                                      |
| Object 1              | type [*required*]                  | enum          | Type of an upstream-entity interaction. Allowed enum values: `trace,experiment_trace,session`                                                                                                                         |
| annotated_interaction | <type=display_block>                    | object        | A display_block interaction with its associated annotations.                                                                                                                                                          |
| <type=display_block>  | annotations [*required*]           | [object]      | List of annotations for this interaction.                                                                                                                                                                             |
| annotations           | created_at [*required*]            | date-time     | Timestamp when the annotation was created.                                                                                                                                                                            |
| annotations           | created_by [*required*]            | string        | Identifier of the user who created the annotation.                                                                                                                                                                    |
| annotations           | id [*required*]                    | string        | Unique identifier of the annotation.                                                                                                                                                                                  |
| annotations           | interaction_id [*required*]        | string        | Identifier of the interaction this annotation belongs to.                                                                                                                                                             |
| annotations           | label_values [*required*]          | object        | Label values for this annotation.                                                                                                                                                                                     |
| annotations           | modified_at [*required*]           | date-time     | Timestamp when the annotation was last modified.                                                                                                                                                                      |
| annotations           | modified_by [*required*]           | string        | Identifier of the user who last modified the annotation.                                                                                                                                                              |
| <type=display_block>  | can_annotate [*required*]          | boolean       | Whether the current caller can annotate this interaction.                                                                                                                                                             |
| <type=display_block>  | content_id [*required*]            | string        | Server-generated deterministic identifier derived from the block list.                                                                                                                                                |
| <type=display_block>  | display_block [*required*]         | [object]      | List of content blocks that make up a `display_block` interaction. Must contain at least one block.                                                                                                                   |
| display_block         | alt                                     | string        | Alternative text for an `image` block.                                                                                                                                                                                |
| display_block         | code                                    | string        | HTML code rendered by a `frontend` block. Required for `frontend` blocks.                                                                                                                                             |
| display_block         | content                                 |               | Block payload. A string for `markdown`, `header`, and `text`; an arbitrary JSON value (object, array, or scalar) for `json`. Omitted for `image`, `widget`, `llmobs_trace`, and `frontend`.                           |
| display_block         | height                                  | int64         | Optional rendered height. Must be positive when set.                                                                                                                                                                  |
| display_block         | interactionType                         | enum          | Upstream interaction type referenced by an `llmobs_trace` block. Restricted to `trace` or `experiment_trace`. Allowed enum values: `trace,experiment_trace`                                                           |
| display_block         | label                                   | string        | Optional label rendered alongside a `frontend` block.                                                                                                                                                                 |
| display_block         | level                                   | enum          | Visual size for a `header` block. Allowed enum values: `sm,md,lg,xl`                                                                                                                                                  |
| display_block         | tileDef                                 |               | Tile definition for a `widget` block. Required for `widget`. The schema is owned by the frontend renderer.                                                                                                            |
| display_block         | timeFrame                               | object        | Unix-millis time range used by chart blocks.                                                                                                                                                                          |
| timeFrame             | end [*required*]                   | int64         | End of the range, in Unix milliseconds.                                                                                                                                                                               |
| timeFrame             | start [*required*]                 | int64         | Start of the range, in Unix milliseconds.                                                                                                                                                                             |
| display_block         | traceId                                 | string        | Trace identifier. Required for `llmobs_trace` blocks.                                                                                                                                                                 |
| display_block         | type [*required*]                  | enum          | Discriminator for a single `display_block` content block. Adding a variant requires coordinated changes in the frontend renderer. Allowed enum values: `markdown,header,text,json,image,widget,llmobs_trace,frontend` |
| display_block         | url                                     | string        | URL of the image. Required for `image` blocks.                                                                                                                                                                        |
| <type=display_block>  | id [*required*]                    | string        | Unique identifier of the interaction.                                                                                                                                                                                 |
| <type=display_block>  | type [*required*]                  | enum          | Type discriminator for a `display_block` interaction. Allowed enum values: `display_block`                                                                                                                            |
| attributes            | events [*required*]                | [object]      | Page of events associated with the annotated interaction.                                                                                                                                                             |
| events                | attributes [*required*]            | object        | Attributes of an event associated with an annotated interaction.                                                                                                                                                      |
| events                | id [*required*]                    | string        | Unique identifier of the event.                                                                                                                                                                                       |
| events                | type [*required*]                  | string        | Type of the event.                                                                                                                                                                                                    |
| attributes            | interaction_type [*required*]      | enum          | Type of an annotated interaction. Allowed enum values: `trace,experiment_trace,session,display_block`                                                                                                                 |
| attributes            | next_cursor                             | string        | Cursor to retrieve the next page of events. Absent when there are no more events.                                                                                                                                     |
| data                  | id [*required*]                    | string        | Unique identifier of the interaction.                                                                                                                                                                                 |
| data                  | type [*required*]                  | enum          | Resource type for annotated interactions. Allowed enum values: `annotated_interactions`                                                                                                                               |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "annotated_interaction": {
        "annotations": [
          {
            "created_at": "2024-01-15T10:30:00Z",
            "created_by": "00000000-0000-0000-0000-000000000002",
            "id": "annotation-789",
            "interaction_id": "interaction-456",
            "label_values": [
              {}
            ],
            "modified_at": "2024-01-15T10:30:00Z",
            "modified_by": "00000000-0000-0000-0000-000000000002"
          }
        ],
        "can_annotate": true,
        "content_id": "trace-abc-123",
        "created_at": "2024-01-15T10:30:00Z",
        "id": "interaction-456",
        "modified_at": "2024-01-15T10:30:00Z",
        "type": "trace"
      },
      "events": [
        {
          "attributes": {
            "duration": 1500000000,
            "ml_app": "my-llm-app",
            "name": "agent_workflow",
            "span_id": "span-7a1b2c3d",
            "span_kind": "agent",
            "start_ns": 1705314600000000000,
            "status": "ok",
            "trace_id": "trace-abc-123"
          },
          "id": "span-7a1b2c3d",
          "type": "span"
        }
      ],
      "interaction_type": "trace",
      "next_cursor": "eyJzdGFydCI6MTAwfQ=="
    },
    "id": "interaction-456",
    "type": "annotated_interactions"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export queue_id="00000000-0000-0000-0000-000000000001" export interaction_id="interaction-456" \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotated-interactions/${interaction_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
{% /tab %}
