Skip to content

sessions_tail

GET
/sessions/{id}/events
curl --request GET \
--url 'https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/events?from=1' \
--header 'Authorization: Bearer <token>'
id
required

A stream id: 72 hex chars, the shard then the owner digest.

string

The session to read.

from
required

Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.

integer format: int64

First cursor to read, inclusive.

to

Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.

integer format: int64

Cursor to stop before; absent, the tail stays open.

One JSON line per record: {"Ok": <record>}, or {"Err": <reason>} if the read failed. Includes compaction.requested and compaction.completed; the latter carries a tenant-readable summary. Earlier records remain on the tail and tool results stay sealed.

Media typeapplication/jsonstream

A landed record: the envelope plus the opaque body beneath it.

object
body
required

The opaque layers beneath the envelope.

envelope
required

The envelope: the only surface the filter is evaluated on. Trellis never reads beneath it.

object
at
required

Unix milliseconds, minted with the cursor at the single point of intake.

integer format: int64
cursor
required

Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.

integer format: int64
idem
One of:
null
kind
required

A kind string and the version of its body, one unit.

object
name
required
string
version
required
integer format: int32
producer
required

Who landed a record. Asserted on the offer, checked by the write clause.

string
size
required
integer format: int32
stream
required

A stream id: 72 hex chars, the shard then the owner digest.

string
to
One of:
null
Example
{
"envelope": {
"stream": "000000000000000000000000000000000000000000000000000000000000000000000000"
}
}

No from, or a cursor that did not parse.

No session token, or one that did not verify.

The token does not attach to this session.