Spans
REST API methods for interacting with Phoenix spans
If true, fulfill request synchronously.
false
POST /v1/span_annotations HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 189
{
"data": [
{
"span_id": "text",
"name": "text",
"annotator_kind": "LLM",
"result": {
"label": "text",
"score": 1,
"explanation": "text"
},
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"identifier": ""
}
]
}
{
"data": [
{
"id": "text"
}
]
}
Return spans within a project filtered by time range. Supports cursor-based pagination.
The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.
Pagination cursor (Span Global ID)
Maximum number of spans to return
100
Inclusive lower bound time
Exclusive upper bound time
GET /v1/projects/{project_identifier}/spans HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"id": "",
"name": "text",
"context": {
"trace_id": "text",
"span_id": "text"
},
"span_kind": "text",
"parent_id": "text",
"start_time": "2025-07-20T17:17:39.137Z",
"end_time": "2025-07-20T17:17:39.137Z",
"status_code": "text",
"status_message": "",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"events": [
{
"name": "text",
"timestamp": "2025-07-20T17:17:39.137Z",
"attributes": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
}
],
"next_cursor": "text"
}
Return spans within a project filtered by time range. Supports cursor-based pagination.
The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.
Pagination cursor (Span Global ID)
Maximum number of spans to return
100
Inclusive lower bound time
Exclusive upper bound time
GET /v1/projects/{project_identifier}/spans/otlpv1 HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"attributes": [
{
"key": "text",
"value": "[Circular Reference]"
}
],
"dropped_attributes_count": 1,
"dropped_events_count": 1,
"dropped_links_count": 1,
"end_time_unix_nano": 1,
"events": [
{
"attributes": "[Circular Reference]",
"dropped_attributes_count": 1,
"name": "text",
"time_unix_nano": 1
}
],
"flags": 1,
"kind": "SPAN_KIND_INTERNAL",
"links": null,
"name": "text",
"parent_span_id": "text",
"span_id": "text",
"start_time_unix_nano": 1,
"status": {
"code": 1,
"message": "text"
},
"trace_id": "text",
"trace_state": "text"
}
],
"next_cursor": "text"
}
Last updated
Was this helpful?