Skip to main content
GET
/
v1
/
traces
/
{traceId}
/
spans
List spans for a trace
curl --request GET \
  --url https://api.agentmark.co/v1/traces/{traceId}/spans \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Agentmark-App-Id: <api-key>'
{
  "data": [
    {
      "cost": 123,
      "duration_ms": 123,
      "id": "<string>",
      "input_tokens": 1,
      "metadata": {},
      "model": "<string>",
      "name": "<string>",
      "output_tokens": 1,
      "parent_id": "<string>",
      "prompt_name": "<string>",
      "service_name": "<string>",
      "span_kind": "<string>",
      "status": "UNSET",
      "status_message": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "tokens": 1,
      "trace_id": "<string>",
      "type": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.agentmark.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Agentmark-App-Id
string
header
required

Application ID for tenant scoping

Authorization
string
header
required

API key (sk_agentmark_*)

Path Parameters

traceId
string
required

Response

All spans for the trace.

data
object[]
required