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 MQ
Other Service Common Question

Instant Command - Send Command

Request Method: POST

URL: http://api.heclouds.com/nbiot/execute

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 must be application/json

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 yes a specific instance id under nbiot device object, determined according to sdk of terminal device
res_id int yes resource id of nbiot device, determined according to sdk of terminal device
timeout int no time for request timeout, default to 25 (unit: second), range of values [5, 40]

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 indicats call is successful
error string error description, "succ" indicats call is successful
Description

For the meaning of returned errno status code, can be [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)

Example of Request

POST http://api.heclouds.com/nbiot/execute HTTP/1.1
api-key: WhI*************v1c=
Content-Type:application/json
Host: api.heclouds.com

Example of Request Parameter

{
    "args": "ping"
}

Example of Return

{
    "errno": 0,
    "error": "succ"
}

results matching ""

    No results matching ""