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
| param | type | required | description |
|---|---|---|---|
| environment | string | no | Exact match on environment |
| limit | number | no | Max results. Default 50, capped at 200 |
| offset | number | no | Pagination 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.