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 Datastream Detail

Request Method: GET

URL: http://iot.zong.com.pk:8000/devices/device_id/datastreams/datastream_id

device_id: need to be replaced with device ID
datastream_id:need to be replaced with datastream ID

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
id string datastream ID
create_time string datastream creation time
update_at string latest data upload time
current_value string/int/json... latest datapoint
cmd string command sent periodically
interval int sampling cycle
formula string calculation formula of register

Example of Request

GET http://iot.zong.com.pk:8000/devices/20474930/datastreams/temperature HTTP/1.1

Example of Return

{
    "errno": 0,
    "data": {
        "create_time": "2017-04-17 14:03:10",
        "update_at": "2017-04-17 14:05:42",
        "formula": "A0+A1",
        "interval": 10,
        "id": "no2",
        "cmd": "010300000002c40b",
        "current_value": {
            "0": "555",
            "1": "0"
        }
    },
    "error": "succ"
}

results matching ""

    No results matching ""