List devices
| Method | Path |
|---|---|
GET | /v1/slim/device |
Authentication · Access policies
Lists the devices in your project with their zone, location and resident names. Use it for device directory and administration screens.
Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs Device:search and Device:read.
Scope: the caller's project (from the token).
Behaviour
- Every device in the project is listed, whether or not it has a location or resident.
idis the Device resource id.thingsboardIdis the device identifier that telemetry is keyed by.statusisactivewhen the device's live telemetry reports it active, otherwiseinactive.lastActivityTimeis the latest telemetry activity time, or the device's last-seen time when telemetry has none.searchmatches device, location and zone names.patientSearchmatches resident names. Both are case-insensitive substring matches.organizationId,locationId,patientIdandactivefilter on exact values.- Rows with an empty sort value sort last in
ASCorder and first inDESCorder. pageis zero-based.countdefaults to 20, maximum 100.totalis the number of rows after filtering.- The device structure is cached for up to 5 minutes. Writes made through the Slim routes refresh it sooner.
- If the device list cannot be built and no earlier complete list exists, the route returns 503. Retry shortly.
Example
curl -X GET 'https://api.sandbox.ovok.com/v1/slim/device?page=0&count=20&sortBy=deviceName&orderBy=ASC' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
Successful response
200 — One page of devices.
Errors
| Status | Meaning |
|---|---|
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, you lack Device:search or Device:read, your session has no project, or you cannot access the project. |
422 | A query parameter fails validation. |