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 an experiment
      • POSTFilter experiments
      • GETRetrieve an experiment
      • DELDelete an experiment
      • GETList or export experiment traces
      • POSTFilter experiment traces
      • GETRetrieve an experiment trace
      • PATCHResume a wait workflow trace
      • GETGet experiment trace summary
      • GETList experiments
      • GETList experiments with filters
      • GETGet experiments summary
      • POSTFilter experiments summary
      • PUTReplace an experiment
      • PATCHUpdate an experiment
      • POSTFilter experiment trace summary
      • GETGet experiment score histogram
      • POSTGet experiment score histogram with filters
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceExperiments

Filter experiment traces

POST
https://api.respan.ai/api/v2/experiments/:experiment_id/logs/list/
POST
/api/v2/experiments/:experiment_id/logs/list/
$curl -X POST "https://api.respan.ai/api/v2/experiments/experiment_id/logs/list/?sort_by=-start_time" \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "count": 150,
3 "results": [
4 {
5 "id": "trace_789abc",
6 "trace_unique_id": "trace_789abc",
7 "root_span_unique_id": "span_root_123",
8 "environment": "production",
9 "customer_identifier": "customer_42",
10 "name": "User Query Processing",
11 "input": "{\"query\": \"What is the weather today?\"}",
12 "output": "{\"response\": \"The weather today is sunny with a high of 75°F.\"}",
13 "expected_output": "{\"response\": \"The weather today is sunny with a high of 75°F.\"}",
14 "status": "success",
15 "comparison_key": "query_20240115_0930",
16 "start_time": "2024-01-15T09:30:00Z",
17 "end_time": "2024-01-15T09:30:01Z",
18 "duration": 1.1,
19 "span_count": 3,
20 "llm_call_count": 1,
21 "total_cost": 0.0012,
22 "total_tokens": 45,
23 "total_prompt_tokens": 30,
24 "total_completion_tokens": 15,
25 "error_count": 0,
26 "scores": {}
27 }
28 ],
29 "next": "https://api.respan.ai/api/v2/experiments/exp_123/logs/list/?page=2",
30 "previous": "https://api.respan.ai/api/v2/experiments/exp_123/logs/list/?page=1",
31 "current_filters": {}
32}

List experiment traces using POST-for-filtering. Supports status, cost, comparison key, timestamp, metadata, and score filters.

Was this page helpful?
Previous

Retrieve an experiment trace

Next
Built with

Path parameters

experiment_idstringRequired

Experiment ID returned as id in experiment responses.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY for API key auth or Bearer <JWT> for dashboard auth.

Query parameters

pageintegerOptional>=1
Page number.
page_sizeintegerOptional1-100
Number of results to return per page. Maximum 100.
sort_bystringOptional

Field to sort by. Prefix with - for descending order.

start_timedatetimeOptional
Filter results at or after this timestamp.
end_timedatetimeOptional
Filter results before this timestamp.
detailenumOptional

Set to 1 or true to include span tree details in list responses.

Allowed values:

Request

This endpoint expects an object.
filtersobjectOptional
Filter criteria using the standard Respan filter format.
is_exportingbooleanOptionalDefaults to false
Reserved for dashboard exports.

Response

Paginated filtered list of experiment traces.
countinteger
Total number of matching results.
resultslist of objects
nextstring or null
URL for the next page, if any.
previousstring or null
URL for the previous page, if any.
current_filtersobject
Normalized filters applied to this request.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error