-
Notifications
You must be signed in to change notification settings - Fork 0
API Actions
Sam Noedel edited this page Jul 1, 2017
·
7 revisions
GET /status
- 200
{ "uptime": 0, "version": "<API semver>" }
GET /burner/lock
Retrieve data regarding the current state of the system lock
- 200
{ "state": "LOCKED|UNLOCKED" }
POST /burner/lock
Obtain a lock on the device and listen for further commands
{
"state": "LOCKED",
"lockId": "<id of current client>"
}
- 200 The burner was armed and is locked for the current client. Since
v1.1.0 the idle timeout before locks are automatically released is included.
{ "timeout": 0 }
- 409 The device is lockedj
- 415 An invalid
Content-Type
header was sent
POST /burner/lock
Release any locks currently held and cease listening for commands from this user
{
"state": "UNLOCKED",
"lockId": "<id of current client>"
}
- 200 The burner was disarmed and is no longer locked for the current user
- 409 The burner is not locked for the current user
- 415 An invalid
Content-Type
header was sent
POST /burner/channel/:channel
Turn the specified channel on.
- Channel can be 0, 1, or 2.
- Channel 0 refers to the left-most burner. Higher channels are further to the right.
- Channels are automatically turned off by the server after a reasonable amount of time.
{
"state": true,
"lockId": "<id of current client>"
}
- 200 The channel was turned on successfully
- 404 The channel number is invalid
- 409 The burner is not locked for the current user
- 415 An invalid
Content-Type
header was sent
POST /burner/channel/:channel
- Channel can be 0, 1, or 2.
- Channel 0 refers to the left-most burner. Higher channels are further to the right.
- Turning off a channel that's already off has no effect.
{
"state": false,
"lockId": "<id of current client>"
}
- 200 The channel was turned off successfully
- 404 The channel number is invalid
- 409 The burner is not locked for the current user
- 415 An invalid
Content-Type
header was sent