Updated
Edit on GitHub
Server API: events
Copy as MarkdownThese routes are on the server API, port 21114 (21121 in Docker). They take an API key in X-API-Key or a sign-in token; see The HTTP API.
The live stream of server events over a WebSocket.
Stream server events.
Opens a WebSocket. Each message is one event as JSON: {"type", "timestamp", "data"}, where data holds text values. The server only sends. Origins other than the server's are refused unless API_WS_ALLOWED_ORIGINS lists them.
On the server API, port 21114. Needs audit.view.
| Parameter | In | Type | What it is |
|---|---|---|---|
filter |
query | string | Only events of this type, such as peer_online; all when missing |
101: Switching to the WebSocket
| Error | When |
|---|---|
| 401 | No credential, or one that is not valid |
| 403 | The credential's role lacks the permission |
| 503 | The event bus is not available |
| default | The request was not a WebSocket upgrade the server could take (plain text) |