subAccountDeviceList(分页获取子账号授权设备详情)
subAccountDeviceList:分页获取子账号授权设备详情
说明: 请使用子账号 token 分页查询授权设备。通用分页设备详情见 分页设备详情(
device.detail.page)。
功能说明
分页获取子账号下授权设备的详细信息,仅可使用子账号 token 调用。
请求地址
https://openapi-[DataCenter].easy4ip.com/openapi/subAccountDeviceList
请求格式
请求参数
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| token | String | 子账号 accessToken |
| page | Integer | 页码(从 1 开始) |
| pageSize | Integer | 每页条数 |
请求示例
{
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1623987465,
"nonce": "39ed36aa-1fac-4e80-83c9-3b457db70ecd"
},
"id": "733b6b5c-05ce-4734-b407-e30dac44e637",
"params": {
"pageSize": 1,
"page": 2,
"token": "St_0000dc28d3ac63bf4cb5ad0e7e2ba731"
}
}
返回 data 字段
deviceList[] 还可能返回可选字段 sdCardStatus(String):平台回填的本地存储卡状态。
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| count | Integer | 设备总数 |
| deviceList.deviceId | String | 设备序列号 |
| deviceList.status | String | 设备状态:online 在线,offline 离线,sleep 休眠,upgrading 升级中 |
| deviceList.deviceModel | String | 设备型号 |
| deviceList.catalog | String | 设备品类 [NVR/DVR/HCVR/IPC/SD/IHG/ARC] |
| deviceList.channels.resolutions.aplist.name | String | 设备名称 |
| deviceList.channels.resolutions.aplist.permission | String | 设备级权限;若仅授权通道级权限,本字段不返回 |
| deviceList.channels.aplist.ability | String | 设备能力项,逗号分隔,详见设备能力集说明 |
| deviceList.channels.aplist.accessType | String | 设备接入类型:空 表示开放平台程序接入;Lechange 表示乐橙/Imou 常规接入设备;Easy4IP 表示 Easy4IP 程序设备;P2P 表示 P2P 程序设备 |
| deviceList.channels.aplist.encryptMode | String | 加密模式:0 默认加密,1 用户自定义加密 |
| deviceList.channels.aplist.channelNum | String | 设备可接入的通道数量 |
| deviceList.channels.channelId | String | 通道号 |
| deviceList.channels.channelName | String | 通道名称 |
| deviceList.channels.ability | String | 通道能力集,如 AlarmMD、AudioTalk,逗号分隔 |
| deviceList.channels.status | String | 远程通道状态:online 在线,offline 离线,close 未配置,sleep 休眠,upgrading 升级中 |
| deviceList.channels.permission | String | 通道权限;若仅授权设备级权限,按设备级权限填写 |
| deviceList.channels.picUrl | String | 缩略图 URL |
| deviceList.resolutions.channels.name | String | 客户端展示的分辨率名称 |
| deviceList.resolutions.channels.imageSize | Integer | 分辨率枚举值 |
| deviceList.resolutions.channels.streamType | Integer | 码流类型:0 高清主码流,1 标清辅码流 |
| deviceList.aplist.apId | String | 配件 ID |
| deviceList.aplist.apName | String | 配件名称 |
| deviceList.aplist.apType | String | 配件类型 |
| deviceList.aplist.apModel | String | 配件型号 |
| deviceList.aplist.ioType | String | 配件 IO 类型:in 输入,out 输出 |
| deviceList.aplist.apVersion | String | 配件版本号 |
| deviceList.aplist.apStatus | String | 配件在线状态:online 在线,offline 离线 |
| deviceList.aplist.apEnable | String | 配件启用:on 启用,off 关闭 |
| deviceList.aplist.apCapacity | String | 配件能力项,逗号分隔,如 AudioTalk、PT |
响应示例
{
"result": {
"msg": "操作成功.",
"code": "0",
"data": {
"count": 2,
"deviceList": [{
"accessType": "",
"catalog": "NVR",
"encryptMode": "0",
"name": "NVR-4993",
"channelNum": "64",
"deviceModel": "DH-NVR5232-I",
"permission": "",
"ability": "Auth,DHP2P,CloudStorage,LocalStorage,PlaybackByFilename",
"deviceId": "TESTQWERXXXX",
"version": "2.145.1000.0.R.20181112",
"status": "offline",
"channels": [{
"picUrl": "",
"channelName": "NVR-4993-4",
"permission": "Alarm,Talk,Ptz,Config,Upgrade",
"ability": "PTZ,MDW,MDS,ChnLocalStorage",
"channelId": "3",
"status": "offline",
"resolutions":[{
"name": "1080P",
"imageSize": 18,
"streamType": 0
}]
}],
"aplist":[{
"apId":"APXXXXXXXXXXX",
"apName":"cname",
"apType":"ability",
"apModel":"wbs",
"ioType":"auto",
"apVersion":"V1.2.3",
"apStatus":"online",
"apEnable":"on",
"apCapacity":"AudioTalk,PT"
}]
}]
}
},
"id": "733b6b5c-05ce-4734-b407-e30dac44e637"
}
错误码
网关与鉴权(SN / TK / OP)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SN1001 | 签名校验异常 | 按 HTTP 开发规范 核对 sign |
TK1002 | token 无效或过期 | 重新获取 accessToken |
OP1002 | 缺少必填参数 | 补必填字段 |
OP1003 | 参数不合法 | 按本页参数表核对 |
OP1009 | 权限不足 | 核对 token 与设备绑定/分享权限 |
OP1013 | 接口总次数超限 | 降低调用频率 |
OP1014 | 接口日限额超限 | 见 接口调用限额 |
DV1007 | 设备离线 | 等设备上线 |
更多见 错误码 · OP/SN/TK。
子账号(SUB)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SUB1001–SUB1002 | 子账号无接口权限 | 在 addPolicy 中补策略 |
SUB1005 | 子账号 token 过期 | 重新 subAccountToken |
SUB1006 | 子账号与设备无授权 | 核对 Resource 与设备序列号 |
SUB1008 | 子账号未绑定应用 | 先创建并绑定子账号 |
更多见 错误码 · SUB。
设备访问与通道(DV10xx)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
DV1007 | 设备离线或超时 | 等设备上线 |
DV1009 | 设备正忙 | 稍后重试 |
DV1012 | 分享/授权设备权限不足 | 核对子账号 Permission / Resource |
DV1019 | 能力集不支持 | 确认型号与能力列表 |
DV1020 | 通道离线 | 检查通道状态 |
DV1026 | 不支持此功能 | 换接口或升级固件 |
DV1028 | 未绑定或通道不存在 | 核对 deviceId / channelId |
更多见 错误码 · DV。
