Skip to content
Update User Terminal authored by Jan Janak's avatar Jan Janak
...@@ -298,3 +298,10 @@ curl http://<hostname>:<port>/api/events?from=2020-04-15T16:00:21.032Z&until=202 ...@@ -298,3 +298,10 @@ curl http://<hostname>:<port>/api/events?from=2020-04-15T16:00:21.032Z&until=202
The values must be in the ISO 8601 timestamp format and are inclusive. The values must be in the ISO 8601 timestamp format and are inclusive.
To delete events stored at a terminal, e.g., after they have been transferred to the base station, the client can send a HTTP DELETE request to `/api/events`. Without the query string, all events stored at the terminal will be deleted. Use the query string parameters 'from' and 'until' (see above) to only delete events in the specified time range. To delete events stored at a terminal, e.g., after they have been transferred to the base station, the client can send a HTTP DELETE request to `/api/events`. Without the query string, all events stored at the terminal will be deleted. Use the query string parameters 'from' and 'until' (see above) to only delete events in the specified time range.
# Real-Time Notifications
Apart from the RESTful HTTP interface described elsewhere on this page, each user terminal also provides a WebSocket based API for real-time notifications. Selected subsystems within the user terminal generate such notifications. The API provides a subscribe mechanism that can be used by the client to indicate interest in real-time notifications.
The WebSocket API is based on [socket.io](https://socket.io/). JavaScript clients can use the [socket.io client library](https://socket.io/docs/client-api/) to connect to the user terminal's WebSocket server. The WebSocket API is available at `ws://<hostname>:<port>/socket.io`, where <hostname> is the hostname of the user terminal and <port> is an ephemeral port number of the terminal's HTTP server that can be discovered via ZeroConf.