Storyden
Robots

Read a Robot session event stream

Read persisted events after an offset and optionally remain attached to the live session tail. The stream remains open while the session is idle so turns started by other members or background work are observable.

GET/robots/sessions/{session_id}/stream

Read persisted events after an offset and optionally remain attached to the live session tail. The stream remains open while the session is idle so turns started by other members or background work are observable.

storyden-session<token>

In: cookie

Path Parameters

session_id*string

Robot session ID

Query Parameters

offset?string

Read events after this stream offset. Use -1 to start at beginning.

live?string

Attach to the live stream tail after catching up.

Response Body

application/json

curl -X GET "https://example.com/robots/sessions/cc5lnd2s1s4652adtu50/stream"
[
  {
    "sequence": 0,
    "turn_id": "cc5lnd2s1s4652adtu50",
    "event_kind": "message",
    "message": {
      "id": "string",
      "role": "system",
      "parts": [
        {
          "type": "text",
          "text": "string",
          "state": "streaming"
        }
      ],
      "metadata": {},
      "created_at": "2019-08-24T14:15:22Z",
      "robot": {
        "id": "cc5lnd2s1s4652adtu50",
        "name": "string"
      },
      "author": {
        "id": "cc5lnd2s1s4652adtu50",
        "joined": "2019-08-24T14:15:22Z",
        "suspended": "2019-08-24T14:15:22Z",
        "handle": "Southclaws",
        "name": "Barnaby Keene",
        "signature": "<body><p>Sent with love from London!</p></body>",
        "roles": [
          {
            "badge": true,
            "default": true,
            "id": "cc5lnd2s1s4652adtu50",
            "name": "string",
            "colour": "string",
            "meta": {}
          }
        ]
      },
      "branch": "string",
      "isolation_scope": "string"
    },
    "parts": [
      {
        "type": "start",
        "messageId": "string"
      }
    ]
  }
]
Empty
Empty
Empty
Empty
{
  "type": "string",
  "title": "string",
  "detail": "string",
  "trace_id": "string",
  "metadata": {}
}