Skip to main content

Count devices per zone (compatibility)

MethodPath
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 its deviceCount, assignedResidentDeviceCount, activeDeviceCount and inactiveDeviceCount.
  • 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. total is 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​

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, you lack Organization:search or Device:search, or your session has no project.