# List projects for device assignment

Canonical page: https://docs.ovok.com/slim-apis/device/list-projects-for-device-assignment

| Method | Path |
| --- | --- |
| `GET` | `/v1/slim/device/assign/project` |

[Authentication](/authentication) · [Access policies](/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 [#request]

No parameters.

## Behaviour [#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 [#example]

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

## Successful response [#successful-response]

`200` — Projects a device can be moved into.

```json
{
  "total": 2,
  "resources": [
    { "project": { "id": "b7a3d915-6e20-4c8f-9a14-3d5f7b9c1e68", "name": "Example project" } },
    { "project": { "id": "c6e2a4f8-0b3d-4719-a5c7-9e1f3b5d7a20", "name": "Parent project" } }
  ]
}
```

| Field | Type | Description |
| --- | --- | --- |
| `total` | `integer` | Number of projects returned. |
| `resources` | `object[]` | Your project, its parent project and its sub-projects. |
| `resources[].project` | `object` | One project. |
| `resources[].project.id` | `string (uuid)` | Project id. |
| `resources[].project.name` | `string` | Project name. Empty string when the project has none. |

## Errors [#errors]

| Status | Meaning |
| --- | --- |
| [`401`](/errors/unauthenticated) | Bearer token is missing, invalid or expired. |
| [`403`](/errors/forbidden) | You are not a practitioner, admin or System Owner, you lack `Device:update`, or your session has no project. |
