For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate a span
      • POSTList spans
      • GETRetrieve a span
      • PATCHUpdate a span
      • POSTGet spans summary
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceSpans

List spans

POST
https://api.respan.ai/api/request-logs/list/
POST
/api/request-logs/list/
$curl -X POST "https://api.respan.ai/api/request-logs/list/?page=1&page_size=50&sort_by=-cost&start_time=2025-01-01T00%3A00%3A00Z&end_time=2025-01-31T23%3A59%3A59Z&environment=production&include_fields=customer_identifier%2Cmodel%2Ccost%2Clatency" \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "operator": "AND"
>}'
1{
2 "count": 1,
3 "results": [
4 {}
5 ],
6 "next": "https://api.respan.ai/api/request-logs/list/?page=2&page_size=50",
7 "previous": "null"
8}

Retrieve spans matching the specified filters with pagination. Supports filtering by any span field, URL-based quick filters, and sorting by evaluator scores. See Filters API Reference for full filter syntax.

Was this page helpful?
Previous

Retrieve a span

Next
Built with

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Query parameters

pageintegerOptionalDefaults to 1
Page number.
page_sizeintegerOptional<=1000Defaults to 50

Results per page (max 1000).

sort_bystringOptionalDefaults to -timestamp

Field to sort by. Prefix - for descending.

start_timedatetimeOptional

Start of time range (ISO 8601).

end_timedatetimeOptional

End of time range (ISO 8601).

environmentstringOptional
Filter by environment.
is_testenumOptional

Filter by test/production spans.

Allowed values:
all_envsenumOptional
Include spans from all environments.
Allowed values:
fetch_filtersenumOptionalDefaults to false
Return available filter options in the response. May slow response.
Allowed values:
include_fieldsstringOptional

Comma-separated list of fields to include in each span. Reduces response size.

Request

This endpoint expects an object.
operatorenumRequiredDefaults to AND
Logical operator to combine filters.
Allowed values:
filtersobjectOptional

Filter criteria. See Filters API Reference for operator syntax.

Response

Successful response for List spans
countinteger
Total number of results
resultslist of objects
Array of results for the current page
nextstring or null
URL for the next page of results
previousstring or null
URL for the previous page of results

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error