OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
API
API Usage API List SDK MQTT LwM2M EDP Modbus TCP
HTTP Push

Cache Command - Read Device Resources

Request Method: GET

URL: http://iot.zong.com.pk:8000/nbiot/offline

http Header

Parameter Name Format Required Description
api-key string yes must be masterkey or apikey with access authority of the device

url Parameter

Parameter Name Format Required Description
imei string yes identity code of nbiot device
obj_id int yes object id of device , determined according to sdk of terminal device
obj_inst_id int no a specific instance id under nbiot device object, determined according to sdk of terminal device
res_id int no resource id of nbiot device , determined according to sdk of terminal device
valid_time string no when the command takes effect, the value to be filled in must be greater than the current time of OneNET server
expired_time string yes command expiration time, which must be greater than valid_time
retry int no means number of failed retries (waiting for the next device update or online to trigger), the value to be filled in must be between [0, 10]
trigger_msg int no upstream message type triggered by the command,the value to be filled in must between [1, 7]

Return Parameter

Parameter Name Format Description
errno int code for call error , 0 indicates call is successful
error string error description, "succ" indicates call is successful
data json device related information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
uuid string offline command uuid
Description

For the meaning of returned errno status code, can [download to view] in the OneNET Documentation Center -> Device Development Guide -> Protocol Document -> “Description of Returned Status Code of Northbound api in NB Protocol” in LWM2M (/book/device-develop/multpro /sdk-doc-tool/doc.md)

valid_time和expired_time格式为:"2018-03-08T17:30:00" The formats of valid_time and expired_time are: "2018-03-08T17:30:00"

trigger_msg trigger type:
1. REGISTER 
2. UPDATE
3. REGISTER | UPDATE COMBINATION
4. NOTIFY
5. REGUSTER | NOTIFY COMBINATION
6. UPDATE | NOTIFY COMBINATION
7. NOTIFY | UPDATE | REGISTE COMBINATION

Example of Request

GET http://iot.zong.com.pk:8000/nbiot/offline HTTP/1.1
api-key: WhI*************v1c=
Host: iot.zong.com.pk:8000

Example of Return

{
    "errno": 0,
    "data": {
        "uuid": "42742677-adc3-54ca-83a1-5aaaf71482f8"
    },
    "error": "succ"
}

results matching ""

    No results matching ""