Add one or more interactions to an annotation queue. At least one
interaction must be provided. Each interaction has a type:
trace, experiment_trace, session: content_id references the
upstream entity; the server fetches the actual content.
display_block: omit content_id and provide the rendered content
in display_block. The server generates content_id as a
deterministic hash of the block list.
Items of different types can be mixed in a single request.
Data object for adding interactions to an annotation queue.
attributes [required]
object
Attributes for adding interactions to an annotation queue.
interactions [required]
[ <oneOf>]
List of interactions to add to the queue. Must contain at least one item.
Option 1
object
An interaction that references an upstream trace, experiment trace, or session.
content_id [required]
string
Upstream entity identifier (trace, experiment trace, or session ID).
type [required]
enum
Type of an upstream-entity interaction.
Allowed enum values: trace,experiment_trace,session
Option 2
object
An interaction whose rendered content is supplied directly as a list
of display blocks. The server generates content_id deterministically
from the block list.
display_block [required]
[object]
List of content blocks that make up a display_block interaction.
Must contain at least one block.
alt
string
Alternative text for an image 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, and llmobs_trace.
height
int64
Optional rendered height. Must be positive when set.
interactionType
enum
Upstream interaction type referenced by an llmobs_trace block.
Restricted to trace or experiment_trace.
Allowed enum values: trace,experiment_trace
label
string
Optional label rendered alongside the block.
level
enum
Visual size for a header block.
Allowed enum values: sm,md,lg,xl
tileDef
Tile definition for a widget block. Required for widget. The
schema is owned by the frontend renderer.
timeFrame
object
Unix-millis time range used by chart blocks.
end [required]
int64
End of the range, in Unix milliseconds.
start [required]
int64
Start of the range, in Unix milliseconds.
traceId
string
Trace identifier. Required for llmobs_trace blocks.
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
url
string
URL of the image. Required for image blocks.
type [required]
enum
Type discriminator for a display_block interaction.
Allowed enum values: display_block
type [required]
enum
Resource type for annotation queue interactions.
Allowed enum values: interactions
Response containing the result of adding interactions to an annotation queue.
Expand All
フィールド
種類
説明
data [required]
object
Data object for the interaction addition response.
attributes [required]
object
Attributes of the interaction addition response.
interactions [required]
[ <oneOf>]
List of interactions that were processed.
Option 1
object
A trace, experiment trace, or session interaction result.
already_existed [required]
boolean
Whether this interaction already existed in the queue.
content_id [required]
string
Upstream entity identifier supplied by the caller.
created_at [required]
date-time
Timestamp when the interaction was added to the queue.
id [required]
string
Unique identifier of the interaction.
modified_at [required]
date-time
Timestamp when the interaction was last updated.
type [required]
enum
Type of an upstream-entity interaction.
Allowed enum values: trace,experiment_trace,session
Option 2
object
A display_block interaction result.
already_existed [required]
boolean
Whether this interaction already existed in the queue.
content_id [required]
string
Server-generated deterministic identifier derived from the block list.
display_block [required]
[object]
List of content blocks that make up a display_block interaction.
Must contain at least one block.
alt
string
Alternative text for an image 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, and llmobs_trace.
height
int64
Optional rendered height. Must be positive when set.
interactionType
enum
Upstream interaction type referenced by an llmobs_trace block.
Restricted to trace or experiment_trace.
Allowed enum values: trace,experiment_trace
label
string
Optional label rendered alongside the block.
level
enum
Visual size for a header block.
Allowed enum values: sm,md,lg,xl
tileDef
Tile definition for a widget block. Required for widget. The
schema is owned by the frontend renderer.
timeFrame
object
Unix-millis time range used by chart blocks.
end [required]
int64
End of the range, in Unix milliseconds.
start [required]
int64
Start of the range, in Unix milliseconds.
traceId
string
Trace identifier. Required for llmobs_trace blocks.
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
url
string
URL of the image. Required for image blocks.
id [required]
string
Unique identifier of the interaction.
type [required]
enum
Type discriminator for a display_block interaction.
Allowed enum values: display_block
id [required]
string
The queue ID the interactions were added to.
type [required]
enum
Resource type for annotation queue interactions.
Allowed enum values: interactions
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Add annotation queue interactions returns "Created" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.createLLMObsAnnotationQueueInteractions"]=true;constapiInstance=newv2.LLMObservabilityApi(configuration);constparams: v2.LLMObservabilityApiCreateLLMObsAnnotationQueueInteractionsRequest={body:{data:{attributes:{interactions:[{contentId:"trace-abc-123",type:"trace",},],},type:"interactions",},},queueId:"queue_id",};apiInstance.createLLMObsAnnotationQueueInteractions(params).then((data: v2.LLMObsAnnotationQueueInteractionsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));