getCondensedRecords(查询智见录像片段)
getCondensedRecords:查询智见录像片段
要点:https://openapi.lechange.cn/openapi/getCondensedRecords · 权限 "Permission":"RecordReplay" "Resource":"cam:序列号:通道号" · 见 错误码
查询智见云存储或AI智见套餐生效期间生成的事件录像集锦或事件图片集锦。
请求参数
| 参数名 | 参数类型 | 是否必填 | 默认值 | 合法值 | 参数说明 |
|---|---|---|---|---|---|
| token | String | 是 | 管理员或者子账号accessToken | ||
| deviceId | String | 是 | 设备序列号 | ||
| channelId | String | 是 | 通道号 | ||
| beginTime | String | 是 | 开始时间,格式yyyy-MM-dd HH:mm:ss | ||
| endTime | String | 是 | 结束时间,格式yyyy-MM-dd HH:mm:ss | ||
| packageType | String | 是 | 智见录像类型,aiInsight:AI智见套餐生成的事件图片集锦;aiCloudRecord:智见云存储生成的事件录像集锦 | ||
| recordId | String | 是 | 分页查询起始录像ID,第一页传-1 | ||
| count | Integer | 是 | 每页查询数量 |
请求示例
{
"id":"d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params":{
"token": "<yourAccessToken>",
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"beginTime":"2023-08-17 10:22:23",
"endTime":"2023-09-17 10:22:23",
"packageType":"aiCloudRecord",
"recordId":"213123",
"count":10
}
}
响应字段
| 字段名 | 字段类型 | 字段说明 | ||
|---|---|---|---|---|
| records | recordId | Long | 智见录像Id | |
| productId | String | IoT设备产品id | ||
| deviceId | String | 设备序列号 | ||
| channelId | String | 通道号 | ||
| channelName | String | 通道名称 | ||
| encryptMode | String | 录像加密模式,0:默认加密模式;1:用户加密模式 | ||
| createTime | String | 智见录像创建时间,yyyyMMddTHHmmss | ||
| size | Integer | 智见录像大小,单位:byte | ||
| length | Integer | 智见录像时长,单位:秒 | ||
| thumbUrl | String | 缩略图Url | ||
| type | String | 录像类型,人、车、宠物、包裹 | ||
| recordPath | String | 录像云端路径 | ||
| recordRegionId | String | 录像分区id | ||
| region | String | 录像资源区域id,用于录像下载授权定位 | ||
| expireTime | String | 录像过期时间戳,服务器时间 | ||
| streamAddr | String | 下载文件的域名地址 | ||
| userId | String | 用户id,用于openSDK客户端播放时使用 | ||
| ak | String | 鉴权相关AK | ||
| fileToken | String | 文件鉴权token | ||
| businessType | String | 业务类型,m3u:712 dav:713 | ||
| method | String | 0-老版智见录像 1-新方案智见录像 | ||
| mp4Videos | tags | String | 标签类型,人、车、宠物、包裹、AI_RISK | |
| timePoint | String | 时间点 | ||
| duration | String | 智见录像时长 | ||
| summary | String | AI分析文案 | ||
| createTime | String | 创建时间 | ||
| updateTime | String | 更新时间 | ||
| expireTime | String | 过期时间戳 | ||
响应示例
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"data": {
"records": [
{
"recordId": "3304819",
"deviceId": "TESTQWERXXXX",
"channelId": "0",
"encryptMode": 1,
"channelName": "门店摄像头1",
"createTime": "20260423T000000",
"size": 238037,
"length": 22,
"thumbUrl": "http://xxxxxxxxx.xx.xxx/xxxxxx",
"type": "包裹",
"recordPath": "xxxxxxxxxxxxxx",
"recordRegionId": "xxxxx|xxxx|2|xxxxx",
"region": "1",
"expireTime": "",
"streamAddr": "https://xxxxxx.imou.com:443",
"userId": "2212322",
"ak": "tIiasd23dfsdfsdg",
"fileToken": "sdhasbdkUIKIsdljfoij34",
"businessType": "712",
"method": 0,
"mp4Videos": [
{
"duration": 24,
"summary": "办公室内多人活动,一戴眼镜白短袖男子在工作",
"expireTime": 1779850855000,
"createTime": 1777258855000,
"timePoint": "10:00",
"updateTime": 1777258855000,
"tags": [
"人"
]
}
]
}
]
},
"code": "0",
"msg": "操作成功"
}
}
错误码
本接口可能返回下列码;完整分组见 错误码。
网关与鉴权(SN / TK / OP)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SN1001 | 签名异常 | 按 签名 核对 sign |
TK1002 | token 无效或过期 | 重新获取 token |
OP1002 | 缺少必填参数 | 补必填字段 |
OP1003 | 参数不合法 | 按本页参数表核对 |
OP1039 | 分钟级限流 | 等到下一分钟再试 |
OP1040 | 调用超限 | 降低频率 |
DV1007 | 设备离线或超时 | 等设备上线 |
子账号(SUB)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
SUB1001 | 子账号无指定权限 | 在 子账号策略 中补权限 |
SUB1002 | 子账号无任何设备权限 | 授权设备或调整策略 |
SUB1005 | 子账号 token 过期 | 重新 获取子账号 token |
SUB1006 | 子账号与设备无授权关系 | 核对 Resource 与设备序列号 |
SUB1008 | 子账号未绑定当前应用 | 先创建并绑定子账号 |
SUB1007 | 创建子账号失败 | 核对参数后重试 |
SUB1009 | 子账号创建失败,账号格式错误 | account 须为手机号或邮箱 |
SUB1010 | 子账号创建失败,账号已存在 | 勿重复绑定同一子账号到应用 |
更多见 错误码 · SUB。
设备访问与通道(DV10xx)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
DV1007 | 设备离线或超时 | 等设备上线;低电休眠先 唤醒 |
DV1009 | 设备正忙 | 稍后重试 |
DV1012 | 分享/授权设备权限不足 | 核对子账号 Permission / Resource |
DV1019 | 能力集不支持 | 确认型号与 设备能力 |
DV1020 | 通道离线 | 检查通道与设备状态 |
DV1026 | 不支持此功能 | 换接口或升级固件 |
DV1028 | 未绑定或通道不存在 | 核对 deviceId / channelId |
DV1030 | 设备休眠 | 唤醒后再调 |
DV1057 | 通道不存在 | 核对通道号 |
DV1061 | 设备响应超时 | 检查设备网络 |
DV1062 | 需先唤醒设备 | 调用唤醒接口 |
DV1069 | 不满足操作条件 | 见 msg |
云录像(RC)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
RC1001 | 云录像不存在 | 核对时间与 token |
OP1019 | 该时间段无录像 | 换时间范围或确认云存储计划 |
更多见 错误码 · RC。
说明
子账号 token 须具备最小权限:Permission 为 RecordReplay,Resource 为 cam:{deviceId}:{channelId}。配置见 权限码。