# Add Device
Request method: POST
URL: http://api.heclouds.com/devices
Parameter Name | Format | Required | Description |
---|---|---|---|
title | string | yes | device name |
desc | string | no | device description |
tags | array-string | no | device tag, can be one or more, see example |
location | json | no | device location coordinate information, expressed in latitude and longitude key-value pairs: {"lon":xx,"lat":xx} |
private | bool | no | device privacy, determine the visibility of device information in sharing links from application editors, defaults to true |
auth_info | string | no | authentication information, recommend to carry, and set it as the product serial number of device |
other | json | no | other custom information of device , expressed in key-value pair format, see example |
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 |
---|---|---|
device_id | string | device ID |
{
"title": "test_device",
"desc": "test_desc",
"tags": ["china", "mobile"],
"location": {
"lon": 109,
"lat": 23.54
},
"auth_info": "tes01235n82105",
"other": {
"version": "1.0.0",
"manufacturer": "china mobile"
}
}
{
"errno": 0,
"data": {
"device_id": "35270468"
},
"error": "succ"
}