The following routes are available since Caldera REST API V1.1.1 (within CalderaDock V3.4).
The device state route allows you to manage devices state remotely.
Start a device
PUT /v1/devices/:device/state "running"
curl --request PUT \
--url http://localhost:12340/v1/devices/{deviceId}/state \
--header 'Content-Type: application/json' \
--data '"running"'
Stop a device
PUT /v1/devices/:device/state "stopped"
curl --request PUT \
--url http://localhost:12340/v1/devices/{deviceId}/state \
--header 'Content-Type: application/json' \
--data '"stopped"'
Block a device
PUT /v1/devices/:device/state "blocked"
curl --request PUT \
--url http://localhost:12340/v1/devices/{deviceId}/state \
--header 'Content-Type: application/json' \
--data '"blocked"'Common error responses
- 400 : invalid state or malformed request
- 403 : operation forbidden by the target device
- 404 : device not found
-
500 : state change failed
Confirm state of a device
GET /v1/devices?id={deviceId}
curl --request GET \
--url http://localhost:12340/v1/devices?id={deviceId} \
--header 'Accept: application/json'