Skip to main content

Dashboard device-presence SSE stream

GET 

/api/v1/device/events/presence

Long-lived Server-Sent Events stream for the dashboard. Opens with a snapshot event carrying the currently-online device ids, then emits a device-presence event per online/offline transition. : ping keepalive comments keep the stream warm.

Request

Responses

SSE stream (text/event-stream). First frame is event: snapshot with data: a DevicePresenceDto[] of the currently-online devices; each following event: device-presence frame carries a single DevicePresenceDto. : ping keepalive comments carry no event.

Schema

    oneOf

    event string

    Possible values: [snapshot, device-presence]

    data

    object

    deviceId stringrequired

    The device whose connection state changed.

    online booleanrequired

    True when the device just came online, false when it went offline.

    at numberrequired

    Epoch-millis timestamp of the transition.

Loading...