跳至主要内容

Shut down a device

POST 

/api/v1/devices/{deviceId}/commands:shutdown

Requests a remote shutdown. Side effect: the device powers off and stays off. It will not respond again until it is manually powered on. 202 returns a command-result object; then GET commands/results and match the returned reqSeqId in the items to follow the outcome.

Request​

Responses​

Accepted. Track the command in GET commands/results by its reqSeqId until phase is result. For a shutdown, status=0 means the device accepted the command and is powering off; status=1 means it failed, and error.code gives the reason (timedOut if the device did not respond within timeoutSeconds; notSupported, permissionDenied or executionFailed if the device rejected the command).