Get sessions list
Sessions
Retrieve Sessions
Retrieve a list of sessions for a workspace. Optionally return the session closest to a provided timestamp.
GET
Get sessions list
Retrieve Sessions
Use this endpoint to retrieve the sessions stored for a specific workspace. This is the primary read endpoint for sessions and is typically used to:- populate dashboards
- load recent session history
- locate the session closest to a given timestamp (using
start_time)
Endpoint
GET/sessions/list/{workspaceId}
Authentication
This endpoint requires a valid workspace API key. Include the API key in the request header:- Header:
x-api-key - Value:
<your-api-key>
Path Parameters
workspaceId (required)
The workspace identifier that owns the sessions table.
- Type:
string - Example:
b0a6c81e-2d5d-4f29-bb4b-9a1e0d9f6c11
Query Parameters
start_time (optional)
If provided, the API returns the session whose start_time is closest to the timestamp you send.
- Type:
string - Format:
date-time(ISO 8601) - Example:
2026-02-14T18:30:00Z
Behavior
This endpoint supports two retrieval modes.1) Default mode (full session history)
Whenstart_time is not provided:
- the API returns all sessions for the workspace
- results are ordered by
start_time DESC(most recent first)
2) Closest-session lookup
Whenstart_time is provided:
- the API calculates the absolute time difference between each stored session and the requested timestamp
- the API returns the single closest session
- results are ordered by smallest time difference
Note: This is not a range filter. Only the closest matching session is returned.
Example Requests
Retrieve all sessions Retrieve the closest session to a timestampResponses
200 OK
Returns an array of session records.
The response structure depends on your workspace session table (ws_sessions_{workspaceId}).
Example response (multiple sessions)
