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

# Update Datastream Attribute Request Method: PUT

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

device_id: need to be replaced with device ID
datastream_id : need to be replaced with device datastream ID

http body Parameter

Parameter Name Format Required Description
tags array-string no datastream tags, can be one or more
unit string no data unit
unit_symbol string no data unit symbol
cmd string no command sent periodically, hexadecimal byte string
example: 010300002c40b
interval int no Sampling cycle
formula string no calculation formula of register , multiple formula separated by commas (,)
examples: (A0 + A1), A0*A1

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

Example of Request Header

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

Example of Request Parameter

{
    "cmd": "010300000002c40b",
    "interval": 10
}

Example of Return

{
    "errno":0,
    "error":"succ"
}

results matching ""

    No results matching ""