Query latest device data in batch
Request format: GET
URL: http(s)://api.heclouds.com/devices/datapoints
I only want to see examples!!!
Url parameter
Parameter Name | Format | Required? | Description |
devIds | string | 是 | Device ids, spaced with comma, at most 500 devices |
Return Parameters
Name | Format | Description |
errno | int | Call error code, where 0 means success. |
error | string | Error description, where "succ" means success. |
data | json | Device dependent message returned after the interface is successfully invoked; see Data Description Table |
Data Description Table
Name | Format | Description |
devices | array-json | Json data array of the device latest data; see devices description list. |
Description table of devices
Name | Format | Description |
id | string | Device id |
title | string | Device name |
datastreams | array-json | Json data array of the device latest data; see devices description list. |
Datastreams Description Table
Name | Format | Description |
id | string | Data stream name |
at | string | Time |
value | string | Latest data value |
Request Example
GET http://api.heclouds.com/devices/datapoints?devIds=12323,12324 HTTP/1.1
api-key: WhI*************v1c=
Content-Type: application/json
Return Example
{
"errno": 0,
"data": {
"devices":[
{
"id":12323,
"title":"daf",
"datastreams":[
{
"id":"temperature",
"at":"2017-02-12 10:22:22",
"value":"12"
},
...
]
},
{
"id":12324,
"title":"daf",
"datastreams":[
{
"id":"temperature",
"at":"2017-02-12 10:22:22",
"value":"15"
},
...
]
},
...
]
},
"error": "succ"
}