Real-time measurement stream (SSE, text/event-stream)
GET
/modules/{id}/stream Server-Sent Events stream, open for as long as the client keeps it. Four kinds of lines:
event: ready— on opening:{ "module_id": 256 };event: measurement— the CALIBRATED snapshot of the module, all depths, with the same body asGET /modules/{id}/measurements/latest. Sent right afterready, then every time a burst of measurements lands;event: reading— a measurement has just arrived:module_id,module_sensor_id(the sensor, see the module’ssensors[].id) andmeasured_at. A frame arrives sensor by sensor: expect a burst, followed by the snapshot;: ping— a comment every 25 seconds, which keeps the connection open.
No replay after a drop: on reconnection, the initial snapshot gives the current state again.
Path parameters
-
idinteger required
Response
200
Stream open
Response body not documented.
Errors
- 400
Invalid parameter
invalid_id - 401
Not authenticated
- 403
Insufficient scope, or resource outside your company