Request format: GET
URL: http(s)://api.heclouds.com/nbiot/offline
I only want to see examples!!!
Parameter Name | Format | Required? | Description |
---|---|---|---|
imei | string | Yes | Identity code of nbiot device, required |
obj_id | int | Yes | Object id of device, equivalent to the data flow id in the platform model, required |
obj_inst_id | int | No | id of a specific instance under nbiot device object, id of instance, corresponding to a part of key value at the data point in the platform model, required |
res_id | int | No | Resource id of nbiot device, optional |
valid_time | string | No | Command effective time, 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, bigger than valid_time valid_time |
retry | int | No | 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. |
bin2hex | boolean | No | true\|false, false by default; if bin2hex is true, the value of which the resource type is Opaque will be converted to hexadecimal character string and returned. |
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、The format of valid_time and expired_time is:"2018-03-08T17:30:00"
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
GET http://api.heclouds.com/nbiot/offline HTTP/1.1
api-key:xxxx-ffff-zzzzz //Must be MasterKey, because it involves personal privacy, use "*******" instead
{
"imei":121, // Identity code of nbiot device, required
"obj_id":1212, // The object id of the device, which corresponds to the data stream id in the platform model, is required
"obj_inst_id": 1212, // The id of a specific instance under the nbiot device object corresponds to a part of the key value of the data point in the platform model, optional
"res_id": 2122, // Resource id of nbiot device, optional
"valid_time":"2018-03-08T17:30:00",// The time when the command starts to take effect, optional (the default is the current time of OneNET if it is not filled in), it must be greater than the current time of the OneNET server
"expired_time": "2018-03-09T17:30:00",// Command expiration time, required and greater than valid_time
"retry":3, // Indicates the number of failed retries (waiting for the next device update or online), optional (default is 3 if not filled), and must be between [3, 10] when filling in
"bin2hex": true// Optional, the value is true|false, the default is false, if bin2hex is true, the value of the resource type Opaque will be converted into a hexadecimal string and returned
}
{
"errno": 0,
"error":"succ",
"data":
{
"uuid":"42742677-adc3-54ca-83a1-5aaaf71482f8"//Cache command uuid
}
} //In the response message, errno represents the error code, and error represents the cause of the error.