Table 3.
API Path | Example | Method | Description |
---|---|---|---|
/api/device | /api/device | GET | Get all devices in system |
/api/device/{:id} | /api/device/1 | GET | Get information of device with id = 1 |
/api/device/light/:id/{:command} | /api/device/light/1/on | POST | Turn on device (light) with id = 1 |
/api/device/light/:id/{:command} | /api/device/light/1/color | POST | Set color for device (light) with id = 1 |
/api/device/security/:id/{:command} | /api/device/lock/3/unlock | POST | Unlock device (lock) with id = 3 |