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 MQ
Other Service Common Question

View Single Device

Request Method: GET

URL: http://api.heclouds.com/devices/device_id

device_id: need to be replaced with device ID

http Header

Parameter Name Format Required Description
api-key string yes must be masterkey or apikey with access authority of the device

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 unique ID assigned by the platform
online bool indicates whether the LWM2M device is online
protocol string device access protocol (LWM2M)
title string device name
desc string device description
create_time string device creation time, Beijing time
obsv bool subscribe or not
private bool device privacy
binary json device-associated image or binary data, see binary description table for detail
tags array-string device tags
location json device location coordinate information, expressed in latitude and longitude key-value pairs: {"lon":xx,"lat":xx}
auth_info string device authentication information, corresponding to the "sn" or "mac" parameter in the device registration interface
other json other custom information of device , expressed in key-value pair format, see example
datastreams array-json json array of device datastream information, see datastreams description table
binary Description Table
Parameter Name Format Description
index string binary data index
at string upload time
size int byte
desc string description
datastreams Description Table
Parameter Name Format Description
id string datastream name
create_time string datastream creation time, Beijing time
unit string unit
unit_symbol string unit symbol

Example of Request

GET http://api.heclouds.com/devices/35****92 HTTP/1.1
api-key: WhI*************v1c=
Host: api.heclouds.com

``

#### Example of Return
```json
{
    "errno": 0,
    "data": {
        "protocol": "LWM2M",
        "other": {
            "version": "1.0.0",
            "manufacturer": "china mobile"
        },
        "create_time": "2018-07-04 17:43:11",
        "online": false,
        "location": {
            "lat": 23.54,
            "lon": 109
        },
        "id": "35282992",
        "auth_info": "tes01235n82105",
        "datastreams": [{
            "unit": "",
            "id": "1",
            "unit_symbol": "",
            "create_time": "2018-07-04 17:43:11"
        }],
        "title": "test_device",
        "desc": "test_desc",
        "tags": ["china", "mobile"]
    },
    "error": "succ"
}

results matching ""

    No results matching ""