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 - Send Command / Execute

Request Method: POST

RL: http://iot.zong.com.pk:8000/nbiot/execute/offline

http Header

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

url Parameter

Parameter Name Format Required Description
imei string yes identity code of nbiot device
obj_id int yes object id of nbiot device, corresponding to datastream id in the platform model
obj_inst_id int yes a specific instance id under device object, corresponding to part of datapoint key value in the platform model
res_id int yes resource id of nbiot device
valid_time string no timestamp for command to take effects, optional (default to OneNET current time when not filled in)
expired_time string yes timestamp for command to expire, which must be greater than valid_time
retry int no between [0 10], means number of failed retries (waiting for the next device update or online), default to 3
trigger_msg int no upstream message type triggered by command, the value to be filled in must be between [1 7]

http Request Parameter

Parameter Name Format Required Description
args string no command string

Return Parameter

Parameter Name Format Description
errno int code for call error , 0 indicates all is successful
error string error description, "succ" indicates call is successful
data json Related information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
uuid string offline command uuid
Description
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

POST http://iot.zong.com.pk:8000/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=
Content-Type: application/json
Host: iot.zong.com.pk:8000

Example of Request Parameter

POST data
{
    "args":"ping"
}

Example of Return

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

results matching ""

    No results matching ""