List zones
| Method | Path |
|---|---|
GET | /v1/slim/zones |
Authentication · Access policies
Lists the zones of your project with their device counts. A zone is a FHIR Organization. Use it for a zone overview; use GET /v1/slim/zones/{zoneId} for one zone's locations.
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 Organization:search, Organization:read and Device:read (admins and super admins skip this check).
Scope: The caller's project (from the token).
Behaviour
- Counts are taken from the same rows as
GET /v1/slim/device/live: only devices assigned to a resident are counted.deviceCountis the number of such devices in the zone;activeDeviceCountandinactiveDeviceCountsplit them by whether the device is currently active, as on the live view. - Only zones with at least one counted device are listed. A zone with no assigned devices does not appear;
GET /v1/slim/zones/device-counts?includeEmpty=truelists it. searchkeeps zones whose name contains the text, ignoring case.sortBy:name(default),deviceCount,activeDeviceCountorinactiveDeviceCount.orderBy:ASC(default) orDESC.- Paging:
pagefrom 0,countfrom 1 to 100 (default 20).totalis the number of zones after the search filter.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/zones?sortBy=deviceCount&orderBy=DESC&page=0&count=20' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
Successful response
200 — Zones retrieved successfully.
Errors
| Status | Meaning |
|---|---|
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, you lack Organization:search, Organization:read or Device:read, or your session has no project. |
422 | A query parameter fails validation. |