Devices API 1.6.0
Controller devices, hardware state and device-related data.
Base path: https://{controller_ip}/api/v1.
API description version: 1.6.0.
Examples use placeholder values for passwords, tokens, UUIDs, addresses and secrets. Replace them with values from your controller before sending requests.
Section methods
GET /devices
Section: Devices.
Returns data for the devices endpoint /devices.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/devices"
}
}
GET /devices/by_controller/{controller}
Section: Devices.
Returns data for the devices endpoint /devices/by_controller/{controller}.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/by_controller/{controller}" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/by_controller/{controller}" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/devices/by_controller/{controller}"
}
}
GET /devices/controllers_list
Section: Devices.
Returns data for the devices endpoint /devices/controllers_list.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/controllers_list" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/controllers_list" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/devices/controllers_list"
}
}
GET /devices/count
Section: Devices.
Returns a count for the devices endpoint /devices/count.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/count" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/count" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"count": 12
}
GET /devices/find
Section: Devices.
Returns data for the devices endpoint /devices/find.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/find?controller=00000583&device_address=/1/1" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/find?controller=00000583&device_address=/1/1" \
-H "Authorization: Bearer <token>" | jq .
Response example
[
{
"uuid": "<device_uuid>",
"controller": "00000583",
"address": "/1/1",
"name": "Reader"
}
]
GET /devices/have_errors
Section: Devices.
Returns data for the devices endpoint /devices/have_errors.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/have_errors" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/have_errors" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/devices/have_errors"
}
}
GET /devices/have_notifications
Section: Devices.
Returns data for the devices endpoint /devices/have_notifications.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/have_notifications" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/have_notifications" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/devices/have_notifications"
}
}
GET /devices/{uuid}
Section: Devices.
Returns data for the devices endpoint /devices/{uuid}.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/devices/{uuid}" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/devices/{uuid}" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/devices/{uuid}"
}
}
POST /devices/action
Section: Devices.
Creates a record or starts an operation for the devices endpoint /devices/action.
Request example
curl -k -X POST "https://{controller_ip}/api/v1/devices/action" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "<device_uuid>",
"action": "restart"
}'
Request body example
{
"uuid": "<device_uuid>",
"action": "restart"
}
Response command example
curl -k -sS -X POST "https://{controller_ip}/api/v1/devices/action" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"status": "success",
"data": {
"uuid": "<uuid>"
}
}
DELETE /devices/{uuid}
Section: Devices.
Deletes data for the devices endpoint /devices/{uuid}.
Request example
curl -k -X DELETE "https://{controller_ip}/api/v1/devices/{uuid}" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X DELETE "https://{controller_ip}/api/v1/devices/{uuid}" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"status": "success",
"deleted": true
}