List live device rows (lean)
- Sandbox: available
- Staging: available
- Production: unknown
Lists live device rows for the dashboard's monitoring views, with only the fields the dashboard renders: each device with its resident, room, zone, current readings and alert colours.
Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs search and read on Patient, Device, Location, Observation and Organization.
Scope: the caller's project (from the token) and its sub-projects.
Behaviour
- The same query, filters, search, sort and paging as
GET /v1/slim/device/live. The difference is where the rows come from: only the Devices are read, with the resident, room and zone context every Slim write stores on them, instead of a sweep of every Patient, Location and Organization of the project. - Every field is present; an absent value is
null. - The resident, room and zone values are the copies stored on the Device, so what a row shows follows the Device's project and access, not a fresh read of the Patient. Each backend fills in devices no Slim write has touched once per build, after it boots; until then such a device answers
residentState: nulland no zone. idis the Medplum Device id.GET /v2/slim/device/live/telemetrykeys its readings by it.- The device structure is cached and refreshed when you write through the Slim routes. Readings and alerts are read fresh on every request.
pageis zero-based.countdefaults to 20, maximum 100.- The route returns 503 when the server is at capacity for live reads or the device list cannot be built. Retry shortly.
Example
curl -X GET 'https://api.sandbox.ovok.com/v2/slim/device/live?page=0&count=20&sortBy=locationName&orderBy=ASC' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>page?string"0"count?string"20"sortBy?string"locationName""locationName""patientName""patientNickname""organizationName""effectiveHeartRate""effectiveRespiratoryRate""effectiveSleepStatus""admissionDate""dischargeDate"orderBy?string"ASC""ASC""DESC"search?string1 <= lengthdeviceId?stringRestrict results to a single device (matched against the device identifier).
1 <= lengthorganizationId?|effectiveSleepStatus?string"disconnected""connected""awake""away""asleep"residentState?string"active""discharged-recent""discharged""archived"includeUnassigned?stringOne page of live device rows.
application/json- response
total*number0 <= valueresources*array<>curl -X GET 'https://api.sandbox.ovok.com/v2/slim/device/live'{ "total": 0, "resources": [ { "id": "string", "name": "string", "patient": { "id": "string", "name": "string", "nickname": "string" }, "location": { "id": "string", "name": "string" }, "zone": { "id": "string", "name": "string" }, "residentState": "active", "telemetry": { "heartRate": { "value": 0, "ts": 0 }, "respiratoryRate": { "value": 0, "ts": 0 }, "sleepStatus": { "value": "string", "ts": 0 }, "lastActivityAt": 0, "active": true }, "alerts": { "heartRateColor": "string", "respiratoryRateColor": "string", "outOfBed": { "communicationRequestId": "string", "sinceTime": "string" } } } ]}List live telemetry and alerts by device GET
Returns the telemetry and alerts for one page of live devices, keyed by device. Use it to poll the values on a page you already loaded with `GET /v1/slim/device/live`. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `search` and `read` on `Patient`, `Device`, `Location`, `Observation` and `Organization`. **Scope:** the caller's project (from the token). ## Behaviour - Takes the same query parameters as `GET /v1/slim/device/live` and selects the same page of devices in the same order. - `telemetry` and `alerts` are keyed by the device identifier (for example `Sleepiz/3001000`), not by the Device resource id. - `alerts` has an entry for every device on the page. `telemetry` has an entry only for devices with telemetry. - Each telemetry entry carries the room readings `roomTemperature` (°C), `humidity` (%), `soundLevel` (dB), `infrared`, `illuminance` (lux), `airQualityIndex`, `tvoc` (ppb) and `eco2` (ppm) as `{ value, ts }`. They are `null` until the device reports one, and again when it has sent none for 30 minutes. They do not depend on whether the resident is in bed. - `total`, `page` and `count` describe the page, as on `/live`. - Telemetry is read fresh on every request. - The route returns 503 when the server is at capacity for live reads or the device list cannot be built. Retry shortly. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/device/live/telemetry?page=0&count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
List live telemetry and alerts by device (lean) GET
Lists the current readings and alert colours of one page of live devices, keyed by Medplum Device id. Poll it with the query you sent to `GET /v2/slim/device/live` to refresh the vitals without reloading the rows. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `search` and `read` on `Patient`, `Device`, `Location`, `Observation` and `Organization`. **Scope:** the caller's project (from the token) and its sub-projects. ## Behaviour - Takes the same query as `GET /v2/slim/device/live` and answers for the same page of devices. - `resources` maps each Device id to its `telemetry` (`null` when the device has sent nothing recent) and `alerts`. - Readings and alerts are read fresh on every request. - The route returns 503 when the server is at capacity for live reads. Retry shortly. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v2/slim/device/live/telemetry?page=0&count=20&sortBy=locationName&orderBy=ASC' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```