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

Request Method: GET

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

device_id: need to be replaced with device 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
protocol string device access protocol
create_time string device creation time, Beijing time
online bool device online status
id string device ID
auth_info string device authentication information, corresponding to the "sn" or "mac" parameter in the device registration interface
title string device name
desc string device description
tags array-string device tags
location json device location coordinate information, expressed in latitude and longitude key-value pairs: {"lon":xx,"lat":xx}
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
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 Return

{
    "errno": 0,
    "data": {
        "protocol": "DTU",
        "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 ""