v2
OpenAPI 3.0.02026-08-051996591.2 MBList spans in a trace
Returns the flat list of spans for a given trace. Each span includes its parent_span_id so you can reconstruct the tree.
Path parameters
The unique identifier of the trace.
Query parameters
When true, include span content such as input and output messages and tool arguments.
Restrict to spans with this operation.
Filter spans to only direct children of this span ID.
When true, exclude nested sub-agent invocations and their descendants. Restricts results to the entry-point invoke_agent span and any spans that belong to the entry agent's session.
The maximum number of spans to return.
The opaque cursor returned in metadata.page_key of the previous response. Omit it to fetch the first page.
Headers
The platform makes a best effort to complete the request in the specified seconds, or it times out.
The platform makes a best effort to complete the request in the specified milliseconds, or it times out.
Response
List of spans in the trace.
Example response
{
"spans": [
{
"span_id": "b7ad6b7169203331",
"operation": "invoke_agent"
}
],
"metadata": {
"page_key": "eyJvZmZzZXQiOjF9"
}
}