Count devices per zone (compatibility)
| Method | Path |
|---|---|
GET | /v1/slim/query/organization/device/count |
Authentication · Access policies
Compatibility route for older zone count clients. Returns device counts per zone. For new integrations, use GET /v1/slim/zones/device-counts.
Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs Organization:search and Device:search.
Scope: the caller's project (from the token). For admins, the counts also cover the project's sub-projects.
Behaviour
- Each entry has the zone (
organization) and itsdeviceCount,assignedResidentDeviceCount,activeDeviceCountandinactiveDeviceCount. - Devices without a zone are counted in an entry without
organization. - Only zones with at least one device are listed, sorted by
deviceCount, highest first. - A device counts as active when its telemetry reports it active.
- The top-level
total*fields sum the counts over all entries.totalis the number of entries. - Results are cached for up to 60 seconds. Writes made through the Slim routes refresh the cache sooner.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/query/organization/device/count' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
Successful response
200 — Organization device count 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 or Device:search, or your session has no project. |