Skip to main content
GET
/
sessions
/
list
/
{workspaceId}
Get sessions list
curl --request GET \
  --url https://api.keyloroblox.xyz/sessions/list/{workspaceId} \
  --header 'x-api-key: <api-key>'

Documentation Index

Fetch the complete documentation index at: https://docs.keylogroup.co.uk/llms.txt

Use this file to discover all available pages before exploring further.

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>
If the API key is missing or invalid, the API will return 401 Unauthorized.

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)

When start_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

When start_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 timestamp

Responses

200 OK

Returns an array of session records.
The response structure depends on your workspace session table (ws_sessions_{workspaceId}).
Example response (multiple sessions)

401 Unauthorized

Returned when the API key is missing or invalid. Example response (missing key) Example response (invalid key)

500 Internal Server Error

Returned when the database query fails.

Internal Data Source (Implementation Detail)

Sessions are read from a workspace-scoped table: This design ensures session data is isolated per workspace and prevents cross-workspace access.

Authorizations

x-api-key
string
header
required

Path Parameters

workspaceId
string
required

Query Parameters

start_time
string<date-time>

Response

Returns list of sessions