Release Device
Forcefully releases the device specified by <deviceId>. The device is either allocated to the user or the user is an administrator.
Users can only release devices accessible by their roles.
URL |
Copy
|
Method |
|
For information on a previous version of this endpoint, see Release Device | Legacy.
Header parameters
Name |
Description |
---|---|
|
The Perfecto security token. For more information, see Generate a security token. |
Request parameters
Name |
Type |
Default |
Description |
---|---|---|---|
|
boolean |
false |
Set to |
Success response
Code: 200
Error response
[
{
"userMessage":"ERROR_MESSAGE",
"developerMessage": "1-63dbebb1-4521fab52df9f41a578221c8"
}
]
where:
-
userMessage
is the error message to be shown. -
developerMessage
is a value that you can send to Perfecto Support to check errors if further investigation is required.
An error is returned in the following cases:
- The device is not found.
- The device is not accessible to the user with the assigned roles.
- The device is not connected.
- The device is not in use.
- The device is not allocated to the user (in user mode).
- The admin is not a user administrator for the user (in admin mode).
Sample error responses
A wrong securityToken is passed in the request (Unauthorized Request Code - 401)
[
{
"userMessage": "Unable to authenticate bearer token",
"developerMessage": "Unable to authenticate bearer token"
}
]
The device is not in use (Bad Request Code - 400)
[
{
"userMessage": "Failed to release device - Can't release device <deviceId> - device is not in use",
"developerMessage": "1-63dbebb1-4521fab52df9f41a578221c8"
}
]
The device is not found (Bad Request Code - 400)
[
{
"userMessage": "Failed to release device - Device not found - <deviceId>",
"developerMessage": "1-63dc7eef-7b16bbe46b71b89f599547dc"
}
]