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

# Add Datastream

Request Method: POST

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

device_id: need to be replaced with device ID

http body Parameter

Parameter Name Format Required Description
id string yes datastream ID, ie datastream name
tags array-string no datastream tags, can be one or more
unit string no data unit
unit_symbol string no data unit symbol

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
ds_uuid string unique ID of datastream inside platform

Example of Request Header

POST http://api.heclouds.com/devices/20474930/datastreams HTTP/1.1

Example of Request body

{
    "id": "speed",
    "tags": ["mobile"],
    "unit": "m/s",
    "unit_symbol": "m/s"
}

Example of Return

{
    "errno": 0,
    "data": {
        "ds_uuid": "856f8622-64e7-5549-8e55-44931f07db6e"
    },
    "error": "succ"
}

results matching ""

    No results matching ""