Skip to main content

Get a trace

POST 

/api/v1/evals/get-trace

Fetch one trace with its observations expanded.

When addressing a turn, conversationId accepts a bare thread id and is qualified with your verified tenant. The assistant message or rating event carries the source user-message identity needed to find that turn.

Observation/score expansion is capped at 20 upstream pages of 100 without a partial-result flag; large detail responses do not establish a complete evaluation cohort. If the expected step is missing, continue with observation search rather than claiming the turn ended there.

The following access conditions are preserved as declared intent and are not implemented by generated code: Authorized scoped domain action.

Use this in a guide: Find out why a customer’s reply was slow

Request​

Responses​

OK

Schema-valid request illustration; replace example identifiers and confirm operation prerequisites.​

Section ID: DOC-IS-evaluation-api-getTrace#example-evals-getTrace-request

Request example

{
"traceId": "trace_123"
}

Guide request for Locate the slow or failed step. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-IS-evaluation-api-getTrace#example-cookbook-insights-evaluation-reading-02-request

Request example

{
"conversationId": "conv_123",
"sourceUserMessageId": "msg_abc"
}

Illustrative response shape; omitted default fields and actual outcomes depend on the operation.​

Section ID: DOC-IS-evaluation-api-getTrace#example-evals-getTrace-response

Response example

{
"trace": {
"summary": {
"traceId": "example_123",
"name": "example",
"inputJson": "{}",
"outputJson": "{}",
"latencySeconds": 1,
"totalCost": 1,
"environment": "example",
"tags": [
"example"
],
"metadataJson": "{}",
"bookmarked": true,
"version": "example",
"release": "example",
"userId": "example_123",
"sessionId": "example_123",
"observationCount": 1,
"conversationId": "example_123",
"sourceUserMessageId": "example_123",
"profileId": "example_123",
"configHash": "example",
"inputTokens": "1",
"outputTokens": "1",
"totalTokens": "1",
"errorCount": 1,
"warningCount": 1,
"defaultCount": 1,
"debugCount": 1,
"commentCount": 1
},
"observations": [
{
"observationId": "example_123",
"traceId": "example_123",
"parentObservationId": "example_123",
"type": "OBSERVATION_TYPE_SPAN",
"name": "example",
"level": "OBSERVATION_LEVEL_DEBUG",
"statusMessage": "example",
"latencySeconds": 1,
"inputJson": "{}",
"outputJson": "{}",
"metadataJson": "{}",
"model": "example",
"modelParametersJson": "{}",
"inputTokens": "1",
"outputTokens": "1",
"totalTokens": "1",
"inputCost": 1,
"outputCost": 1,
"totalCost": 1,
"environment": "example",
"version": "example",
"promptName": "Example text",
"promptVersion": 1,
"commentCount": 1,
"conversationId": "example_123",
"sourceUserMessageId": "example_123",
"profileId": "example_123",
"configHash": "example"
}
],
"scores": [
{
"scoreId": "example_123",
"targetType": "EVAL_TARGET_TYPE_TRACE",
"targetId": "example_123",
"name": "example",
"dataType": "SCORE_DATA_TYPE_NUMERIC",
"numericValue": 1,
"stringValue": "example",
"booleanValue": true,
"source": "SCORE_SOURCE_JUDGE",
"comment": "example",
"textValue": "Example text",
"authorUserId": "example_123",
"configId": "example_123",
"queueId": "example_123",
"traceId": "example_123",
"observationId": "example_123",
"sessionId": "example_123",
"datasetRunId": "example_123",
"environment": "example",
"metadataJson": "{}",
"traceName": "example",
"userId": "example_123",
"sourceLabel": "example",
"conversationId": "example_123",
"messageId": "example_123",
"messageSequence": "1",
"profileId": "example_123",
"configHash": "example"
}
]
},
"contentRedacted": true
}

Document ID: DOC-IS-evaluation-api-getTrace. Section identities and revisions.

SectionStable reference
Get a traceDOC-IS-evaluation-api-getTrace#overview
RequestDOC-IS-evaluation-api-getTrace#request
ResponsesDOC-IS-evaluation-api-getTrace#responses