Introduction
The events websockets API lets you subscribe to events that occur in the framework and
receive real-time push notifications. The endpoint is at /api/ws/events. Unlike the
REST API, websockets are not covered by OpenAPI. This page
is the only reference for the events API.
Overview¶
POST /api/loginwith credentials to receive a JSON Web Token.POST /api/ws/ticketwith that token in theAuthorizationheader to receive a short-lived, single-use ticket. A websocket handshake cannot carry a header, so the token is exchanged for a credential that can travel in the URL.- Open a websocket to
/api/ws/events?ticket=TICKET. - Send action commands as JSON strings to subscribe, unsubscribe, or query subscriptions.
- Receive event payloads as JSON whenever a subscribed event fires.
Each connection needs its own freshly issued ticket. See authentication for the full exchange.
Usage¶
The events API suits two use cases: embedding in a client to react to server-push events without polling, or running standalone for scripting and automation. This documentation focuses on the standalone case, building a simple notification system from the ground up.