請求方式:GET
URL:http://api.onenet.hk.chinamobile.com/cmds/cmd_uuid
cmd_uuid:需要被替換為命令lD
| 參數名稱 | 格式 | 說明 |
|---|---|---|
| errno | int | 調用錯誤碼,為0表示調用成功 |
| error | string | 錯誤描述,為“succ”表示調用成功 |
| data | json | 介面調用成功之後返回的命令狀態信息,見data描述表 |
data描述表
| 參數名稱 | 格式 | 說明 |
|---|---|---|
| status | int | 命令狀態,見命令狀態說明 |
| desc | string | 狀態描述 |
命令狀態說明
| 狀態值 | 狀態描述 | 常見場景 |
|---|---|---|
| 1 | 命令已創建Command Created | 設備離線,調用發送命令API,帶有timeout參數時 |
| 2 | 命令已發往設備Command Sent | 設備在線,但是未做命令應答時 |
| 4 | 設備正常回應Command Response Received | 設備接收到命令且正常發送命令回應 |
GET http://api.onenet.hk.chinamobile.com/cmds/81572aae-fc34-5deb-8f06-ab45d73cb12b HTTP/1.1
{
"errno": 0,
"data": {
"status": 1,
"desc": "command created"
},
"error": "succ"
}
{
"errno": 0,
"data": {
"status": 4,
"desc": "Command Response Received"
},
"error": "succ"
}