# Batch Inquire Datastream Information
Request Method: GET
URL: http://api.heclouds.com/devices/device_id/datastreams
device_id: need to be replaced with device ID
URL Request Parameter
Parameter Name |
Format |
Required |
Description |
datastream_ids |
string |
no |
datastream ID, multiple ids separated by commas, default to inquire all datastream |
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 |
array-json |
device related information returned after successful interface call, see data description table |
data Description Table
Parameter Name |
Format |
Description |
id |
string |
datastream ID |
create_time |
string |
datastream creation time |
update_at |
string |
latest data upload time |
current_value |
string/int/json... |
latest datapoint |
Example of Request
GET http://api.heclouds.com/devices/20474930/datastreams?datastream_ids=aaa,bbb HTTP/1.1
Example of Return
{
"errno": 0,
"data": [{
"update_at": "2017-11-20 10:03:10",
"id": "aaa",
"create_time": "2017-11-20 09:59:35",
"current_value": {
"Header": {
"CipherType": 1,
"DevType": 1
},
"Body": 3
}
}, {
"update_at": "2017-12-22 10:30:22",
"id": "bbb",
"create_time": "2017-12-22 10:12:36",
"current_value": 1
}],
"error": "succ"
}