NB-IoT Suite Product Introduction QuickStart User Guide Device Development Guide Application Development Guide Best Practices FAQ Service agreement Update Log

Cache command-read device resource /Read

Request format: GET

URL: http(s)://api.heclouds.com/nbiot/offline

I only want to see examples!!!

Url parameter

Parameter NameFormatRequired?Description
imeistringYesIdentity code of nbiot device, required
obj_idintYesObject id of device, equivalent to the data flow id in the platform model, required
obj_inst_idintNoid 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_idintNoResource id of nbiot device, optional
valid_timestringNoCommand 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_timestringYesCommand expiration time, bigger than valid_time valid_time
retryintNoTimes 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].
timeoutintNoExpiration time; when it’s filled in, it shall be between [5, 40]s; when left blank, it’s 25s by default.
trigger_msgintNoCommand trigger uplink message type; when it’s filled in, it shall be between [1, 7]; when left blank, it’s 7 by default.
bin2hexbooleanNotrue\|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.

Return Parameters

NameFormatDescription
errnointCall error code, where 0 means success.
error stringError description, where "succ" means success.
datajsonDevice dependent message returned after the interface is successfully invoked; see Data Description Table
Data Description Table
NameFormatDescription
uuidstring Cache command uuid
Description

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

Request Example

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

Request parameter example

{
"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
}

Return example

{
    "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.

< 即时命令-命令下发

缓存命令-写设备资源 >

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “