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

#Inquire Command Status

Request Method: GET

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

cmd_uuid: need to be replaced with command ID

HTTP Request 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 command status information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
status int command status, see command status description
desc string status description
Command Status Description
Status Value Status Description Common Scenario
1 Command Created device offline, call API for sending command, with timeout parameter
2 Command Sent when device online, but no command response.
4 Command Response Received device received command, and sent command response normally.

Example of Request

GET http://iot.zong.com.pk:8000/cmds/81572aae-fc34-5deb-8f06-ab45d73cb12b HTTP/1.1

Example 1 of Return: Successfully created command but device is not online

{
    "errno": 0,
    "data": {
        "status": 1,
        "desc": "command created"
    },
    "error": "succ"
}

Example 2 of Return: Command Response Received

{
    "errno": 0,
    "data": {
        "status": 4,
        "desc": "Command Response Received"
    },
    "error": "succ"
}

results matching ""

    No results matching ""