Skip to content

Establish a persistent WebSocket connection to receive notification updates as they are produced. The transport is a single bidirectional WebSocket — clients receive JSON-formatted notification messages and heartbeat frames over the open socket. Use this endpoint when a display needs live updates without polling the notifications REST API.

For the broader notification model, see the Notification Server overview.

GET /api/v1/notifications/stream

Opens a WebSocket connection for real-time notification updates. Subscribe to one or more displays via the required displays query parameter, or pass "all" to receive notifications from every display. Once the handshake completes, the server pushes notification messages — and periodic heartbeat frames — directly over the open socket.

NameInTypeRequiredDescription
displaysquerystringYesComma-separated display IDs to subscribe to (e.g., 0,:1,2), or "all" to receive notifications from every display.

This endpoint accepts no request body.

{
"description": "Switching Protocols - WebSocket connection established"
}

The WebSocket handshake completed successfully. Subsequent frames received on the open socket are JSON notification messages and heartbeats.

// Subscribe to specific displays
const stream = client.notifications.connectStream({ displays: "0,:1,2" });
stream.on("message", (frame) => {
// frame is a JSON notification or heartbeat message
console.log(frame);
});
// Subscribe to every display
const all = client.notifications.connectStream({ displays: "all" });