获取设备信息
接口描述
根据设备序列号获取设备信息。
请求说明
| 接口ID |
协议 |
方法 |
PATH |
| 2 |
HTTPS |
GET |
/openapi/v1/stp/user/devices/:sn |
PATH参数
| 参数 |
类型 |
必填 |
说明 |
| sn |
string |
是 |
PATH中的:sn需要替换为具体的设备序列号 |
URL参数
| 参数 |
类型 |
必填 |
说明 |
| accesskey_id |
string |
是 |
参见签名认证 |
| expires |
int |
是 |
参见签名认证 |
| signature |
string |
是 |
参见签名认证 |
请求示例
GET https://open.vzicloud.com/openapi/v1/stp/user/devices/12345678-87654321?accesskey_id=8d9EsDAD2115Q5PM8tuP6g1IdAglkayp&expires=1619022787&signature=G29eTBjMm0gZF7cpXNLX7Hrn0yM%3D HTTP/1.1
返回说明
返回参数
| 参数 |
类型 |
说明 |
| sn |
string |
设备的SN |
| name |
string |
设备的名称 |
| state |
string |
设备状态(0:在线/1:离线) |
| group_id |
string |
分组id |
| company_id |
string |
公司id |
| local_ip |
string |
设备网卡IP |
| global_ip |
string |
设备公网IP |
| series_name |
string |
设备系列名称 |
| soft_version |
string |
设备软件版本 |
| board_version |
int |
设备board_version |
| username |
string |
设备登录用户名 |
| password |
string |
设备登录密码 |
| addition |
struct |
附加信息 |
| + http_port |
int |
设备网页端口 |
| + enable_ssl |
bool |
是否启用ssl |
| + mac_addr |
string |
设备内置有线网卡mac |
| + rtsp_port |
int |
rtsp端口 |
| region |
struct |
设备区域(由设备公网IP粗略定位) |
| + city_name |
string |
市/县/区 |
| + region_name |
string |
省/直辖市 |
| + country_name |
string |
国家 |
| last_offline_time |
int |
上次离线时间 |
| last_online_time |
int |
上次上线时间 |
| create_time |
string |
云端设备信息创建时间,为mysql.timestamp类型 |
| update_time |
string |
云端设备信息更新时间,为mysql.timestamp类型 |
| remark |
string |
备注 |
注:返回参数里可能还包含其他信息但未在上面的表格内列出,请勿使用!
返回示例
{
"remark": "",
"local_ip": "192.168.6.171",
"global_ip": "192.168.6.171",
"name": "VAP-RX-1",
"soft_version": "8.2.2.202105073",
"addition": {
"http_port": 80,
"enable_ssl": false,
"mac_addr": "58:e8:76:8e:73:20",
"rtsp_port": 8557
},
"sn": "12345678-87654321",
"last_offline_time": 1624348815,
"series_name": "RX",
"region": {
"city_name": "",
"region_name": "局域网",
"country_name": "局域网"
},
"username": "",
"password": "",
"state": 1,
"update_time": "2021-06-22 16:00:15.466406",
"board_version": 12363,
"company_id": 1,
"last_online_time": 1624345846,
"create_time": "2021-06-16 15:34:36.541017",
"group_id": 0
}