Documentation menu

Sessions

List user sessions aggregated from log events.

GET /api/sessions

Lists sessions aggregated from log events that carry a session_id. Also available at /api/orgs/:orgSlug/projects/:projectSlug/sessions (session-cookie/dashboard scoping).

Auth: API key (Bearer) or session cookie

Query params

paramtyperequireddescription
environmentstringnoExact match on environment
limitnumbernoMax results. Default 50, capped at 200
offsetnumbernoPagination offset. Default 0

Response 200

{
  "sessions": [
    {
      "session_id": "sess_abc123",
      "event_count": 42,
      "first_event": 1720392000000,
      "last_event": 1720393800000,
      "error_count": 3,
      "warn_count": 5,
      "crash_count": 0
    }
  ]
}

Sessions are grouped purely by session_id (events with no session_id are excluded) and sorted by last_event descending. error_count/warn_count count events by level; crash_count counts events by type = 'crash'.

Common responses (401; 402 and 429 don’t apply to this endpoint) — see Authentication.