sessions_tail
const url = 'https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/events?from=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/events?from=1' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A stream id: 72 hex chars, the shard then the owner digest.
The session to read.
Query Parameters
Section titled “Query Parameters”Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.
First cursor to read, inclusive.
Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.
Cursor to stop before; absent, the tail stays open.
Responses
Section titled “Responses”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.
A landed record: the envelope plus the opaque body beneath it.
object
The opaque layers beneath the envelope.
The envelope: the only surface the filter is evaluated on. Trellis never reads beneath it.
object
Unix milliseconds, minted with the cursor at the single point of intake.
Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.
A kind string and the version of its body, one unit.
object
Who landed a record. Asserted on the offer, checked by the write clause.
A stream id: 72 hex chars, the shard then the owner digest.
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.