Employee Devices
Endpointsβ
List devices assigned to an employeeβ
GET
/public/v2/employees/{id}/devices
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Responsesβ
- 200: OK
Bulk assign devices to an employeeβ
POST
/public/v2/employees/{id}/devices
Adds the provided devices to the employee. If a device is already assigned, it updates the permission.
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Request Body (application/json)β
[
{
"device_id": 0,
"permission_id": 0
}
]
Responsesβ
- 200: Array of assigned devices
Bulk remove devices from an employeeβ
DELETE
/public/v2/employees/{id}/devices
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Request Body (application/json)β
[
{
"device_id": 0
}
]
Responsesβ
- 200: Removed successfully
Sync (Overwrite) devices for an employeeβ
POST
/public/v2/employees/{id}/devices/sync
Removes all current devices for the employee and replaces them with the provided list.
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Responsesβ
- 200: Synced successfully