LoguDocs
Open Logu

Events · stream

Realtime stream (WebSocket)

GET /v1/stream

The apps' realtime feed: a WebSocket upgrade that pushes event.created, ask.created and ask.settled messages for the workspace. Browsers can't send headers on a WebSocket, so the workspace may also be given as ?workspace=. Answers 101 Switching Protocols. A workspace holds at most 200 streams: over that, the socket opens and is closed with code 1013 (try again later), so reconnect with backoff and jitter. The text frame resync (not JSON) means messages were dropped under load: reload your lists. Answers 503 overloaded with Retry-After when the hub can't take the connection.

Who may call it
humans: every member
Server
https://api.logu.dev

Parameters#

NameInTypeRequiredDescription
workspacequerystringoptionalThe workspace to stream (instead of the Logu-Workspace header). · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6
Logu-WorkspaceheaderstringoptionalHumans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6

Example#

curl -s "https://api.logu.dev/v1/stream" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN"

Responses#

101

Switching Protocols: the WebSocket is open.

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
400bad_requestThe request is malformed or a field is invalid (see issues).
401unauthorizedNo credentials, or the API key or session is invalid or revoked.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
404not_foundNo such route, or the resource doesn't exist in your workspace.
500internal_errorSomething went wrong on Logu's side.
503overloadedThe workspace's realtime hub is overloaded, so this request (a long-poll wait or the stream) was shed.