Get current threshold
- Sandbox: available
- Staging: available
- Production: unknown
Returns the home's threshold configuration: the alert limits every resident follows unless they have limits of their own.
Deprecated. Use
GET /v2/slim/threshold. This v1 route stays available, unchanged, until every client has moved.
Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant PlanDefinition:read (an admin or super admin who holds no access policy skips this check).
Scope: The caller's project (from the token).
Behaviour
- Read-only.
- A home that has never saved thresholds gets the default template, with no
id: heart rate on at 40–110 and respiratory rate on at 8–25 (the limits a new home is seeded with), and every other metric disabled. - If the stored thresholds cannot be read, the route answers 502, never the default template.
- Units:
durationOfOutOfBedis in seconds,sleepDurationin hours. - The home's limit ranges and the optional vitals (SpO₂, pulse rate, perfusion index, body temperature) are only on the v2 route.
- Heart-rate and respiratory-rate limits are evaluated by Signals. Ovok stores them and forwards them to Signals.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/threshold' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>Current threshold retrieved successfully.
application/json- response
id?stringprojectId?stringstatus*string"active""retired"date?stringdate-timesettings*curl -X GET 'https://api.sandbox.ovok.com/v1/slim/threshold'{ "id": "string", "projectId": "string", "status": "active", "date": "2019-08-24T14:15:22Z", "settings": { "heartRate": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 1000 } }, "meanHeartRate": { "mode": "organization", "enabled": true, "relative": { "enabled": true, "min": 0, "max": 1000 } }, "respiratoryRate": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 1000 } }, "meanRespiratoryRate": { "mode": "organization", "enabled": true, "relative": { "enabled": true, "min": 0, "max": 1000 } }, "durationOfOutOfBed": { "mode": "organization", "enabled": true, "period": { "start": "19:00:00", "end": "09:00:00" }, "absolute": { "enabled": true, "max": 1000000 }, "relative": { "enabled": true, "max": 100 } }, "sleepDuration": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 1000 } }, "numberOfTimesGettingOutOfBed": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "max": 1000 } }, "oxygenSaturation": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 0 } }, "pulseRate": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 0 } }, "perfusionIndex": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 0 } }, "bodyTemperature": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 0, "max": 0 } } }}Get device telemetry and alerts GET
Returns the current telemetry and alerts for one device. Use it to poll the resident detail view. **Auth:** bearer token. The caller must be a practitioner, an admin or a System Owner, and needs `Device:read`. **Scope:** the caller's project (from the token). Only devices in that project are found. ## Behaviour - `deviceId` is either the device identifier (for example `Sleepiz/3001000`) or the Device resource id (a UUID). A UUID is resolved to the identifier. - The response `deviceId` is the identifier the telemetry is keyed by. - `telemetry` and `alerts` have the same shape as one entry of `GET /v1/slim/device/live/telemetry`. - The device is looked up among the first 1000 devices of your project, including devices without a resident. - Telemetry is read fresh on every request. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/telemetry/c3499c27-2973-0a7f-807e-fb8676a92dcb' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
Update threshold PUT
Replaces the home's threshold configuration: the alert limits every resident follows unless they have limits of their own. > **Deprecated.** Use `PUT /v2/slim/threshold`. This v1 route stays available until every client has moved. **Auth:** Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant `PlanDefinition:update` (an admin or super admin who holds no access policy skips this check). **Scope:** The caller's project (from the token). ## Behaviour - The body replaces the stored settings; fields you omit take their schema defaults, except the out-of-bed window: a body without `durationOfOutOfBed.period`, or without `durationOfOutOfBed`, keeps the home's stored window (19:00:00 to 09:00:00 when it has none). The home's limit ranges and optional vitals, which v1 cannot send, are kept as stored. - Units: `durationOfOutOfBed` is in seconds, `sleepDuration` in hours. - `enabled: false` switches a metric fully off: its `absolute` and `relative` bands are stored off too, whatever their own `enabled` says, and the residents following the home hold no Signals limit for it (a resident with limits of their own keeps them). Out of bed keeps its `relative` band, which only tightens its limit while it is on. - To switch a metric back on, send its band's `enabled: true` as well. A switch-off stores the band's flag `false`, so a body that sets only the metric's `enabled: true` reads back `enabled: true` but arms nothing: the residents following the home get no limit for it. - `meanHeartRate` and `meanRespiratoryRate` relative bands cannot be enabled for the home: a resident without a baseline of their own would get no alarm from them. Set baseline limits per resident. One sent under `enabled: false` is stored off. - Every limit is evaluated by Signals, so every save is all or nothing, as `PUT /v2/slim/threshold` describes: it answers once Signals holds the home's limits, which every resident following the home follows at once, or puts everything back and answers an error with `saved: false` (409 another save or a tenant move got in the way; 502 out of time, or Signals did not take them; 500 the undo failed too). Nothing is stored then; send the save again. A 504 from the gateway can come while a failed save is still being put back: read the limits before sending it again. - A change-history entry is written for a save that stands. - The response is the saved configuration. ## Example ```bash curl -X PUT 'https://api.sandbox.ovok.com/v1/slim/threshold' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "status": "active", "settings": { "heartRate": { "mode": "organization", "enabled": true, "absolute": { "enabled": true, "min": 40, "max": 120 } } } }' ```