# Add Datastream
Request Method: POST
URL: http://api.heclouds.com/devices/device_id/datastreams
device_id: need to be replaced with device ID
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 |
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 |
Parameter Name | Format | Description |
---|---|---|
ds_uuid | string | unique ID of datastream inside platform |
POST http://api.heclouds.com/devices/20474930/datastreams HTTP/1.1
{
"id": "speed",
"tags": ["mobile"],
"unit": "m/s",
"unit_symbol": "m/s"
}
{
"errno": 0,
"data": {
"ds_uuid": "856f8622-64e7-5549-8e55-44931f07db6e"
},
"error": "succ"
}