getCondensedRecords(查询智见录像片段)
getCondensedRecords:查询智见录像片段
功能详情
分页查询 AI 智见或智见事件云存储生效期间生成的事件图片集锦或事件录像集锦片段列表。
请求地址
POST https://openapi-[DataCenter].easy4ip.com/openapi/getCondensedRecords
最小权限
管理员或子账号 token。权限见 权限码。
传入参数
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
| token | String | 是 | 管理员或子账号 accessToken |
| deviceId | String | 是 | 设备序列号 |
| channelId | String | 是 | 通道号;集成须传。子账号 Resource 须含 cam:{deviceId}:{channelId} 取值 ≥0 的整数。 |
| productId | String | 否 | 物模型产品 ID(可选) |
| beginTime | String | 是 | 开始时间 取值 yyyy-MM-dd HH:mm:ss。 |
| endTime | String | 是 | 结束时间;须晚于或等于 beginTime 取值 yyyy-MM-dd HH:mm:ss。 |
| packageType | String | 是 | 同 queryCondensedRecordBitmap 取值 aiInsight、aiCloudRecord。 |
| recordId | String | 否 | 分页游标:首页传 -1 或不传;翻页传上一页最后一条的 recordId |
| count | Integer | 是 | 本页条数 取值 ≥1。 |
样例输入
{
"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": "-1",
"count": 10
}
}
返回 data
| 字段名 | 字段类型 | 字段说明 |
|---|---|---|
| records | Array | 智见集锦列表 |
| records[].recordId | Long | 智见集锦 id |
| records[].productId | String | 物模型产品 id(如有) |
| records[].deviceId | String | 设备序列号 |
| records[].channelId | String | 通道号 |
| records[].channelName | String | 通道名称 |
| records[].encryptMode | String | 加密模式:0 默认加密;1 用户加密 |
| records[].createTime | String | 创建时间,格式 yyyyMMddTHHmmss |
| records[].size | Integer | 文件大小(byte) |
| records[].length | Integer | 时长(秒) |
| records[].thumbUrl | String | 缩略图 URL |
| records[].type | String | 检测类型摘要(如人、车、宠物、包裹) |
| records[].recordPath | String | 云端路径 |
| records[].recordRegionId | String | 录像分区 id |
| records[].region | String | 资源区域 id(下载授权定位) |
| records[].expireTime | String | 过期时间戳 |
| records[].streamAddr | String | 下载域名 |
| records[].userId | String | 用户 id(客户端播放) |
| records[].ak | String | 鉴权 AK |
| records[].fileToken | String | 文件鉴权 token |
| records[].businessType | String | 业务类型,如 712(m3u)、713(dav) |
| records[].method | String | 0 旧版智见集锦;1 新方案 |
| records[].mp4Videos | Array | 帧选/分段信息(新方案) |
| records[].mp4Videos[].tags | String / Array | 标签(人、车、宠物、包裹等) |
| records[].mp4Videos[].timePoint | String | 时间点 |
| records[].mp4Videos[].duration | String / Integer | 片段时长 |
| records[].mp4Videos[].summary | String | AI 摘要文案 |
| records[].mp4Videos[].createTime | String / Long | 创建时间 |
| records[].mp4Videos[].updateTime | String / Long | 更新时间 |
| records[].mp4Videos[].expireTime | String / Long | 过期时间戳 |
样例输出
{
"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://example.com/thumb",
"type": "包裹",
"recordPath": "xxxxxxxxxxxxxx",
"recordRegionId": "xxxxx|xxxx|2|xxxxx",
"region": "1",
"expireTime": "",
"streamAddr": "https://example.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 无效或过期 | 重新获取 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。
云录像(RC)
| 错误码 | 错误码说明 | 下一步 |
|---|---|---|
RC1001 | 云录像不存在 | 核对时间与 token |
OP1019 | 该时间段无录像 | 换时间范围或确认云存储计划 |
更多见 错误码 · RC。
说明
子账号 token 须具备最小权限:Permission 为 RecordReplay,Resource 为 cam:{deviceId}:{channelId}。见 权限码。
