List traces
Retrieve a paginated list of traces matching your filters. Supports the filter payload documented in the Filters API.
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.
Query parameters
page
Page number.
page_size
Results per page (max 1000).
sort_by
Field to sort by. Prefix - for descending. Common values include -timestamp, -total_cost, -duration, -total_tokens, and -error_count.
start_time
Start of time range (ISO 8601). Defaults to one hour before end_time when omitted.
end_time
End of time range (ISO 8601). Defaults to now when omitted.
environment
Filter by environment.
Request
This endpoint expects an object.
Response
Paginated list of traces.
count
Total number of matching traces.
results
Current page of traces.
next
URL for the next page of results.
previous
URL for the previous page of results.
Errors
400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error