Get project device counts
| Method | Path |
|---|---|
GET | /v1/slim/project/:id/device-counts |
Authentication · Access policies
Returns summary counts of the devices in a project: total, assigned to a resident, active and by manufacturer. Use it for project overview tiles.
Auth: Bearer token. The caller's access policy must grant Device:search and Device:read (project admins skip this check).
Scope: The project in the path. It must be the caller's project (from the token) or a direct child of it.
Behaviour
- Counts come from the project's live device list, the same rows that back the live device views. That list is cached, so a device change can take a moment to show.
- A row is left out when its device, resident, location or organization belongs to another project.
assignedResidentDeviceCountcounts devices with a resident;unassignedDeviceCountis the rest.activeDeviceCountcounts devices whose latest telemetry reports them active;inactiveDeviceCountis the rest.withingsDeviceCountcounts devices whose serial number resolves to Withings. Every other device is counted inradarDeviceCount.- If the device list fails to build, the last complete list is used.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21/device-counts' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
Successful response
200 — Device counts retrieved successfully.
Errors
| Status | Meaning |
|---|---|
400 | The project is neither the caller's project nor a direct child of it. |
401 | The bearer token is missing or invalid. |
403 | The session has no profile, or its access policy lacks Device:search or Device:read. |
422 | id is empty. |