Skip to content
Update User Terminal authored by Jan Janak's avatar Jan Janak
......@@ -254,3 +254,27 @@ The following command streams speaker audio from the terminal with sample rate 8
```sh
curl -o speaker.wav http://<hostname>:<port>/audio/speaker?rate=8000&format=S16LE&fragmentSize=16000
```
# Events
Each user terminal generates time-stamped events during an experiment. The events represent settings changes, user interactions (e.g., PTT button), and recorded audio streams. During the experiment, the terminal stores all generated events locally. At the end of the experiment, the base station retrieves events from all terminals. The API endpoints under `/api/events` can be used to retrieve events stored at the terminal.
To get all events currently stored at the user terminal, send a HTTP GET request to `/api/events`. The API returns a JSON array with all events currently stored at the terminal.
```sh
curl http://<hostname>:<port>/api/events
```
```json
[{
"id" : 1,
"timestamp" : "2020-04-15T16:00:11.490Z",
"event" : "restart"
}, {
"id" : 2,
"timestamp" : "2020-04-15T16:00:21.032Z",
"event" : "ptt.press"
}, {
"id" : 3,
"timestamp" : "2020-04-15T16:00:25.049Z",
"event" : "ptt.release"
}]
```
\ No newline at end of file