Covendocs

Read one session's events (path-scoped)

1 min read

GET
/sessions/{id}/events

Path Parameters

id*string

The session id (stable across daemon restarts).

Query Parameters

afterSeq?integer

Preferred cursor. Returns events with seq > afterSeq; pass nextCursor.afterSeq from the previous page to resume reading. Takes precedence over afterEventId when both are supplied. Non-integer values fail with 400 invalid_request.

Range0 <= value
afterEventId?string

Compatibility cursor for clients that stored event ids instead of sequence numbers. The daemon resolves the id to its sequence position and returns events after it. Ignored when afterSeq is also supplied; unknown ids read from the start of the log.

limit?integer

Maximum number of events to return. Out-of-range values are clamped to 1–1000 rather than rejected; non-integer values fail with 400 invalid_request. When omitted, all events after the cursor are returned in one page. hasMore in the response is only meaningful when a limit is set — it is true when the page filled the limit.

Range1 <= value <= 1000

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/sessions/session-1/events"
{
  "events": [
    {
      "seq": 42,
      "id": "event-1",
      "session_id": "session-1",
      "kind": "output",
      "payload_json": "{\"data\":\"hello\"}",
      "created_at": "2026-05-09T06:43:10.000Z"
    }
  ],
  "nextCursor": {
    "afterSeq": 42
  },
  "hasMore": false
}
{
  "error": {
    "code": "invalid_request",
    "message": "Required field \"sessionId\" is missing.",
    "details": {
      "field": "sessionId"
    }
  }
}
{
  "error": {
    "code": "session_not_found",
    "message": "Session was not found.",
    "details": {
      "sessionId": "session-1"
    }
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Unexpected internal daemon error.",
    "details": {}
  }
}
Was this page helpful?No

Last updated on