Request format: POST
URL: http(s)://api.heclouds.com/nbiot/execute/offline
I only want to see examples!!!
Parameter Name | Format | Required? | Description |
---|---|---|---|
imei | string | Yes | IMEI of device module, required |
obj_id | int | Yes | object id of nbiot device, equivalent to the data flow id in the platform model, required |
obj_inst_id | int | Yes | id of a specific instance under the device object id of instance, corresponding to a part of key value at the data point in the platform model, required |
res_id | int | Yes | Resource id of nbiot device, required |
valid_time | string | No | Command effective time stamp, optional (When it’s left blank, it’s the current time of OneNET by default); when it’s filled in, it shall be bigger than the current time of OneNET server. |
expired_time | string | Yes | Command expiration time stamp, required, bigger than val |
retry | int | No | Between [0-10]; times of retry after failure (waiting for the device update or online next time), optional (when left blank, 3 by default); when it’s filled in, it shall be between [0, 10]. |
timeout | int | No | Expiration time; when it’s filled in, it shall be between [5, 40]s; when left blank, it’s 25s by default. |
trigger_msg | int | No | Command trigger uplink message type; when it’s filled in, it shall be between [1, 7]; when left blank, it’s 7 by default |
Parameter Name | Format | Required? | Description |
---|---|---|---|
args | string | 否 | Command character string, size restricted to be 2k |
Name | Format | Description |
---|---|---|
errno | int | Call error code, where 0 means success. |
error | string | Error description, where "succ" means success. |
data | json | Device dependent message returned after the interface is successfully invoked; see Data Description Table |
Name | Format | Description |
---|---|---|
uuid | string | Cache command uuid |
1、Return to the meaning corresponding to errno status code; check API status code.。
2、HTTP content is optional.
trigger_msg Trigger type:
1. REGISTER
2. UPDATE
3. REGISTER | UPDATE combination
4. NOTIFY
5. REGISTER | NOTIFY combination
6. UPDATE | NOTIFY combination
7. NOTIFY | UPDATE | REGISTER combination
POST http://api.heclouds.com/nbiot/execute/offline?imei=86582003***&valid_time=2016-08-05T08:00:00&expired_time=2016-08-06T08:00:00&obj_id=1212&obj_inst_id=1212&res_id=123 HTTP/1.1
api-key: WhI*************v1c= //Must be MasterKey, because it involves personal privacy, use "*******" instead
POST data
{
"args":"ping" //string
} //HTTP content part is optional
{
"errno": 0,
"data": {
"uuid":"42742677-adc3-54ca-83a1-5aaaf71482f8" //Cache command uuid
},
"error": "succ"
} //In the response message, errno represents the error code, and error represents the cause of the error.