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

# Batch Inquire Device Latest Data Request Method: GET

URL: http://iot.zong.com.pk:8000/devices/datapoints

URL Request Parameter

Parameter Name Format Required Description
devIds string no specify device ID, multiple separated by commas, up to 1000

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
devices array-json json array of device information, see devices description table
devices Description Table
Parameter Name Format Description
id string device ID
title string device name
datastreams array-json json array of device datastream information, see datastreams description table
datastreams Description Table
Parameter Name Format Description
id string datastream name
at string datapoint latest time, Beijing time
value string/int/json... datapoint value

Example of Request

GET http://iot.zong.com.pk:8000/devices/datapoints?devIds=20474930,23840492 HTTP/1.1

Example of Return

{
    "errno": 0,
    "data": {
        "devices": [{
            "title": "test",
            "id": "20474930",
            "datastreams": [{
                "at": "2017-12-22 10:30:22",
                "id": "value",
                "value": 1
            }, {
                "at": "2017-11-20 10:03:10",
                "id": "0x01",
                "value": {
                    "Header": {
                        "Cmdid": 1,
                        "DevType": 1
                    },
                    "Body": "3839383630326239383436",
                    "AcqTime": "17:11:15:13:26:4",
                    "LogSN": 3
                }
            }]
        }, {
            "title": "1",
            "id": "23840492",
            "datastreams": [{
                "at": "2017-12-22 10:31:00",
                "id": "value",
                "value": 1
            }]
        }]
    },
    "error": "succ"
}

results matching ""

    No results matching ""