Skip to main content
GET
/
trace_session_stats
Get Trace Statistics by Session
curl --request GET \
  --url https://api.example.com/trace_session_stats \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "session_id": "37029bc6-1794-4ba8-a629-1efedc53dcad",
      "user_id": "[email protected]",
      "agent_id": "hackernews-agent",
      "total_traces": 5,
      "first_trace_at": "2025-11-19T10:15:16+00:00",
      "last_trace_at": "2025-11-19T10:21:30+00:00"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total_pages": 3,
    "total_count": 45
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

user_id
string | null

Filter by user ID

agent_id
string | null

Filter by agent ID

team_id
string | null

Filter by team ID

workflow_id
string | null

Filter by workflow ID

start_time
string | null

Filter sessions with traces created after this time (ISO 8601 format with timezone, e.g., '2025-11-19T10:00:00Z' or '2025-11-19T15:30:00+05:30'). Times are converted to UTC for comparison.

end_time
string | null

Filter sessions with traces created before this time (ISO 8601 format with timezone, e.g., '2025-11-19T11:00:00Z' or '2025-11-19T16:30:00+05:30'). Times are converted to UTC for comparison.

page
integer
default:1

Page number (1-indexed)

Required range: x >= 1
limit
integer
default:20

Number of sessions per page

Required range: 1 <= x <= 100
db_id
string | null

Database ID to query statistics from

Response

Trace statistics retrieved successfully

data
TraceSessionStats · object[]
required

List of items for the current page

meta
PaginationInfo · object
required

Pagination metadata