Devices

List projects for device assignment

List projects for device assignment using Ovok’s Slim API.

MethodPath
GET/v1/slim/device/assign/project

Authentication · Access policies

Lists the projects you can move a device into: your own project, its parent project and its sub-projects.

Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs Device:update. Scope: the caller's project (from the token) and its parent and sub-projects.

Request

No parameters.

Behaviour

  • Each entry is { project: { id, name } }. name is an empty string when the project has none.
  • total is the number of projects returned.
  • Read-only.

Example

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/device/assign/project' \
  -H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response

200 — Projects a device can be moved into.

{
  "total": 2,
  "resources": [
    { "project": { "id": "b7a3d915-6e20-4c8f-9a14-3d5f7b9c1e68", "name": "Example project" } },
    { "project": { "id": "c6e2a4f8-0b3d-4719-a5c7-9e1f3b5d7a20", "name": "Parent project" } }
  ]
}
FieldTypeDescription
totalintegerNumber of projects returned.
resourcesobject[]Your project, its parent project and its sub-projects.
resources[].projectobjectOne project.
resources[].project.idstring (uuid)Project id.
resources[].project.namestringProject name. Empty string when the project has none.

Errors

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

Last updated on

On this page