Request format: GET
URL: http(s)://api.heclouds.com/devices
I only want to see examples!!!
Parameter Name | Format | Required? | Description |
---|---|---|---|
key_words | string | No | Match the key word from the left of id and title field. |
auth_info | string | No | Authentication information |
tag | array-string | No | Device tag |
online | bool | No | Device online status |
private | bool | No | Device privacy |
page | int | No | Specify the page number, max. 10000 |
per_page | int | No | Specify the number of output devices on each page, by default 30, maximum 100 |
device_id | string | No | Specify the device ID, separated by commas, max. 100 |
begin | string | No | Beginning time, Beijing time. Example: 10/1/2019 |
end | string | No | End time, Beijing time. Example:10/1/2019 |
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 |
Name | Format | Description |
---|---|---|
total_count | int | Number of devices in the query result |
page | int | Current page number |
per_page | int | Number of devices per page |
devices | array-json | Json data array of the device information; see devices description list. |
Name | Format | Description |
---|---|---|
protocol | string | Device access protocol |
create_time | string | Device creation time, Beijing time |
online | bool | Device online status |
id | string | Device ID |
auth_info | string | Device authorization information, corresponding to “sn” or “mac” parameter in the device registration interface |
title | string | Device name |
desc | string | Device description |
tags | array-string | Device tag |
location | json | Device location coordinate, represented by latitude and longitude key-value {“lon” xx “lat” xx} |
other | json | Other custom information of the device, in the key-value pair format. See the example. |
Query the online device created from 2017-02-04 to 2017-06-04 with the tag being china.
GET http://api.heclouds.com/devices?begin=2017-02-04&end=2017-06-04&online=true&tag=china HTTP/1.1
Query two devices with the device ID being 35282992 and 35271941.
GET http://api.heclouds.com/devices?device_id=35282992,35271941 HTTP/1.1
Query all devices under this product
GET http://api.heclouds.com/devices HTTP/1.1
{
"errno": 0,
"data": {
"per_page": 30,
"devices": [{
"protocol": "EDP",
"other": {
"version": "1.0.0",
"manufacturer": "china mobile"
},
"create_time": "2018-06-04 17:43:11",
"online": true,
"location": {
"lat": 23.54,
"lon": 109
},
"id": "35282992",
"auth_info": "tes01235n82105",
"title": "test_device",
"desc": "test_desc",
"tags": ["china", "mobile"]
}, {
"protocol": "EDP",
"create_time": "2018-06-04 11:15:38",
"online": true,
"id": "35271941",
"auth_info": "tes810372105",
"title": "test_device",
"tags": ["china"]
}],
"total_count": 2,
"page": 1
},
"error": "succ"
}