NylorunDocsBeta
Runtime APISessions

Follow turns as they change

GET
/v1/turns

The turn index's change feed (Host feature turns): each turn's status, times, totals and A2A context and task, in the order the turns changed, a turn again each time it changes. Pass the page's cursor as changedAfter to read on; it is returned even when no turn changed. With sessionId, one session's turns, oldest first. An application key reads the whole Tenant; acting for a person, only theirs.

Authorization

headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Query Parameters

changedAfter?string

The cursor a previous page returned: read the changes after it. Absent: from the first turn.

sessionId?string

Only this session's turns.

limit?integer

At most this many turns, up to 500; a larger limit gets that many. Default 100

Range1 <= value

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Nylorun-Subject?string

The person an application key acts for

Nylorun-Scopes?string

The subject's space-separated scopes; required with a subject

Response Body

The turns that changed after the cursor

application/json
  1. response
turns*array<>
cursor*string
hasMore*boolean
curl -X GET "https://example.com/v1/turns" \  -H "Nylorun-Protocol: string"
{  "turns": [    {      "turnId": "string",      "sessionId": "string",      "agentId": "string",      "status": "running",      "startedAt": "string",      "endedAt": "string",      "changedAt": "string",      "totals": {        "steps": 0,        "tokens": 0,        "costUsd": 0      },      "a2a": {        "contextId": "string",        "taskId": "string"      }    }  ],  "cursor": "string",  "hasMore": true}