Multiprotocol Access Product Introduction QuickStart User Guide Development Guide
EDP TCP transparent transmission MQTT Modbus HTTP
FAQ

Batch query of device’s latest data

Request format: GET

URL: http://api.onenet.hk.chinamobile.com/devices/datapoints

URL request parameter

Name Format Required or not Description
devIds string No Specify the device ID, separated by commas, max. 1000

Return Parameters

Name Format Description
errno int Call error code, where 0 means success.
error string Error description. “succ” means the call is successful.
data json Device-related information returned after interface is successfully called. See the Data Description Table.
Data Description Table
Name Format Description
devices array- json Json array of device information. See the description table of devices.
Description table of devices
Name Format Description
id string Device ID
title string Device name
datastreams array- json json array of device data stream. See the datastreams description table.
Datastreams Description Table
Name Format Description
id string Data stream name
at string The latest time of data point, Beijing time
value string/int/json... Data point value

### Request Example

GET http://api.onenet.hk.chinamobile.com/devices/datapoints?devIds=20474930,23840492 HTTP/1.1

Return Example

{
    "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"
}

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “