Manage Power Supply and Get Device Status
# Manage Power Supply and Get Device Status
# Manage Power Supply
Path:
/api/action
Method: POST
Content-type: application/json; charset=utf-8
API Description: This can be used to make the terminal sleep, wake the terminal, or reboot the terminal.
Request
Name | Type | Example | Description |
---|---|---|---|
command | String | sleep | Make the terminal sleep. |
Examples
- Terminal sleeps
{"command":"sleep"}
- Wake terminal
{"command":"wakeup"}
- Reboot terminal
{"command":"reboot"}
# Get Device Status (Sleep or Awake)
Path:
/api/powerstatus.json
Method: GET
Content-type: application/json; charset=utf-8
API Description: This can be used to get the current status of the terminal (Sleep/Awake).
Response
Name | Type | Example | Description |
---|---|---|---|
powerstatus | int | 1 | 0--Sleep, 1--Awake |
Example
{"powerstatus": 1}