Get project device counts
- Sandbox: available
- Staging: available
- Production: unknown
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 (a project admin who holds no access policy skips 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/c3499c27-2973-0a7f-807e-fb8676a92dcb/device-counts' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>id*string1 <= lengthDevice counts retrieved successfully.
application/json- response
projectId*stringtotalDeviceCount*number0 <= valueassignedResidentDeviceCount*number0 <= valueunassignedDeviceCount*number0 <= valueactiveDeviceCount*number0 <= valueinactiveDeviceCount*number0 <= valueradarDeviceCount*number0 <= valuewithingsDeviceCount*number0 <= valuecurl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/string/device-counts'{ "projectId": "string", "totalDeviceCount": 0, "assignedResidentDeviceCount": 0, "unassignedDeviceCount": 0, "activeDeviceCount": 0, "inactiveDeviceCount": 0, "radarDeviceCount": 0, "withingsDeviceCount": 0}List project users GET
Lists the practitioner memberships of a given project: your own project or one of its direct child projects. Use it to manage the team of a child project from its parent. **Auth:** Bearer token for a practitioner, project admin or System Owner session. The caller's access policy must grant `Practitioner:read` (a project admin who holds no access policy skips this check). The session must carry a project. **Scope:** The project in the path. It must be the caller's project (from the token) or a direct child of it. Grandchildren are not reachable. ## Behaviour - The project is read first, so an unknown or out-of-scope `id` fails before any membership is searched. - Rows, filters, sorting, paging and `status` work exactly as in `GET /v1/slim/project/users`: one row per `Practitioner` membership with a user and a profile, `search` is fuzzy over profile, user and access policy names, `count` is 1 to 100 (default `20`). - Answers are cached for up to about a minute. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb/users?count=50' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```
Get project patient counts GET
Returns summary counts of the residents in a project by state: active, recently discharged, discharged and archived. Use it for project overview tiles. **Auth:** Bearer token. The caller's access policy must grant `Patient:search` and `Patient:read` (a project admin who holds no access policy skips 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, so only residents linked to a device row are counted. A resident without a device is not included. - Each resident is counted once, even when linked to several devices. - A row is left out when its device, resident, location or organization belongs to another project. - The device list is cached, so a change can take a moment to show. If the list fails to build, the last complete list is used. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/slim/project/c3499c27-2973-0a7f-807e-fb8676a92dcb/patient-counts' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```