GET /api/v1/cloud/sessions/{session_id}/events
Retrieves public Session events with cursor pagination. If the Accept header requests text/event-stream, this route switches to SSE streaming; use Accept: application/json or omit the SSE media type for the paginated JSON response.
If the Session was created with incremental_streaming_enabled: true, the response may include persisted incremental agent events. If the flag is false or omitted, incremental events are hidden and only full public events are returned.
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID with the sess_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of events to return. Default 20, range 1-100. Values above 100 return 400 invalid_request_error. |
page | string | No | Opaque cursor from a previous response’s next_page. Mutually exclusive with before_id and after_id |
before_id | string | No | Return events ordered before this event ID. Mutually exclusive with page and after_id |
after_id | string | No | Return events ordered after this event ID. Mutually exclusive with page and before_id |
order | string | No | Sort direction: asc (default) or desc |
types | string or array | No | Filter by event type. Unrecognized event types are silently ignored — the response simply contains no matching events |
created_at[gt] | string | No | Return events created after this RFC 3339 timestamp |
created_at[gte] | string | No | Return events created at or after this RFC 3339 timestamp |
created_at[lt] | string | No | Return events created before this RFC 3339 timestamp |
created_at[lte] | string | No | Return events created at or before this RFC 3339 timestamp |
Example request
Example response
HTTP 200 OKEvent types
See Public event types for the full set of event types exposed by list and stream endpoints. For incremental streaming Sessions, use the top-level event typesagent.message_start, agent.content_block_start, agent.content_block_delta, agent.content_block_stop, agent.message_delta, and agent.message_stop when filtering types. Do not filter by text_delta or input_json_delta; those are nested delta.type values inside agent.content_block_delta.
Response fields
| Field | Type | Description |
|---|---|---|
data | array | List of public Event objects |
has_more | boolean | Whether more results are available beyond this page |
first_id | string | null | ID of the first event in the current page |
last_id | string | null | ID of the last event in the current page |
next_page | string | null | Opaque cursor for the next page, or null when there are no more results |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Invalid limit (non-integer or non-positive), invalid order, invalid timestamp filter, or simultaneously providing page with before_id/after_id |
| 401 | authentication_error | PAT invalid or expired |
Note: This endpoint returns HTTP 200 with an emptydataarray for non-existent Session IDs, enabling clients to poll safely. UseGET /api/v1/cloud/sessions/{id}to verify Session existence.
Example: 400 invalid order
Example: 400 invalid limit
Related
Session event stream
Stream agent thinking, messages, tool calls, and status over SSE.