# Server-API: events

Quelle: https://docs.neode.sk/de/development/api-reference/server-events/
Zuletzt geändert: 2026-12-03

> 1 Operation. The live stream of server events over a WebSocket.

Diese Routen liegen auf der Server-API, Port 21114 (21121 in Docker). Sie nehmen einen API-Schlüssel in `X-API-Key` oder ein Anmelde-Token; siehe [Die HTTP-API](https://docs.neode.sk/de/development/api.md#signing-in). Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

The live stream of server events over a WebSocket.

## GET /api/ws/events

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) |
