Sessions API
List Sessions
Section titled “List Sessions”GET /api/v1/project/{project_id}/otel/sessionsQuery sessions with pagination and filters.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Items per page (default: 50) |
order_by | string | Sort field (e.g., start_time:desc) |
user_id | string | Filter by user ID |
environment | string or array | Filter by environment |
from_timestamp | string | Filter from timestamp (ISO 8601) |
to_timestamp | string | Filter to timestamp (ISO 8601) |
filters | JSON | Advanced filters (see below) |
Response
Section titled “Response”{ "data": [ { "session_id": "session-789", "user_id": "user-123", "environment": "development", "start_time": "2025-01-26T10:12:34Z", "end_time": "2025-01-26T10:15:02Z", "trace_count": 3, "total_tokens": 980, "total_cost": 0.048 } ], "meta": { "page": 1, "limit": 50, "total_items": 42, "total_pages": 1 }}Get Session
Section titled “Get Session”GET /api/v1/project/{project_id}/otel/sessions/{session_id}Returns the session summary plus a list of traces in the session.
Get Session Messages
Section titled “Get Session Messages”GET /api/v1/project/{project_id}/otel/sessions/{session_id}/messagesGet normalized messages (SideML format) across the session.
Delete Sessions
Section titled “Delete Sessions”DELETE /api/v1/project/{project_id}/otel/sessionsRequest body:
{ "session_ids": ["session-123", "session-456"] }Get Filter Options
Section titled “Get Filter Options”GET /api/v1/project/{project_id}/otel/sessions/filter-optionsAdvanced Filters
Section titled “Advanced Filters”Pass a JSON array in the filters query param:
[{"key": "user_id", "op": "eq", "value": "user-123"}]Next Steps
Section titled “Next Steps”- Traces API — query runs
- Spans API — query individual steps
- SSE Streaming — real-time updates