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

# Send Command Request Method: POST

URL:http://iot.zong.com.pk:8000/cmds

URL Parameter

Parameter Name Format Required Description
device_id string yes device ID that received the data

http Request Content

Parameter Name Format Required Description
cmd string yes format needs to be a string of hexadecimal data, see example

http Request Return Parameter

Parameter Name Format Description
errno int code for call error , 0 indicates call is successful
error string error description, "succ" indicats call is successful
data json device related information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
cmd_uuid string command id, unique within the platform

Example of Request Header

POST http://iot.zong.com.pk:8000/cmds?device_id=8029377 HTTP/1.1

Example of Request Parameter

{
    "cmd":"07030001000295AD"
}

Example 1 of Return: successfully create a command

{
    "errno": 0,
    "error": "succ",
    "data": {
        "cmd_uuid": "81572aae-fc34-5deb-8f06-ab45d73cb12b"
    }
}

Example 2 of Return : device is not online

{
    "errno": 10,
    "error": "device not online: 8029377"
}

results matching ""

    No results matching ""