Saltar al contenido principal

Employee Devices

Endpoints

List devices assigned to an employee

GET /public/v2/employees/{id}/devices

Parameters

NameInTypeRequiredDescription
idpathstringYes

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

NameInTypeRequiredDescription
idpathstringYes

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

NameInTypeRequiredDescription
idpathstringYes

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

NameInTypeRequiredDescription
idpathstringYes

Responses

  • 200: Synced successfully