getCondensedRecords: Query AI Insight highlight clips
getCondensedRecords: Query AI Insight highlight clips
What it does
Page through event image highlights or event video highlights generated while AI Insight or AI Insight cloud storage is active.
Request URL
POST https://openapi-[DataCenter].easy4ip.com/openapi/getCondensedRecords
Minimum permission
Administrator or sub-account token. See Permission codes.
Request parameters
| Parameter name | Parameter type | Required or not | Parameter description |
|---|---|---|---|
| token | String | Yes | Administrator or sub-account accessToken |
| deviceId | String | Yes | Device serial number |
| channelId | String | Yes | Channel ID; always pass for integration. Sub-account Resource must include cam:{deviceId}:{channelId} Allowed values: Integer ≥ 0. |
| productId | String | No | Thing-model product ID (optional) |
| beginTime | String | Yes | Start time Allowed values: yyyy-MM-dd HH:mm:ss. |
| endTime | String | Yes | End time; must be ≥ beginTime Allowed values: yyyy-MM-dd HH:mm:ss. |
| packageType | String | Yes | Same as queryCondensedRecordBitmap Allowed values: aiInsight, aiCloudRecord. |
| recordId | String | No | Pagination cursor: -1 or omit on first page; next page uses last item recordId |
| count | Integer | Yes | Page size Allowed values: ≥ 1. |
Common request fields and signing: Signing conventions and Common request payload.
Sample input
{
"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
}
}
Response data fields
| Field name | Field type | Description |
|---|---|---|
| records | Array | Highlight clip list |
| records[].recordId | Long | Highlight clip id |
| records[].productId | String | Thing-model product id (if present) |
| records[].deviceId | String | Device serial number |
| records[].channelId | String | Channel ID |
| records[].channelName | String | Channel name |
| records[].encryptMode | String | 0 default encryption; 1 user encryption |
| records[].createTime | String | Created at, yyyyMMddTHHmmss |
| records[].size | Integer | Size in bytes |
| records[].length | Integer | Duration in seconds |
| records[].thumbUrl | String | Thumbnail URL |
| records[].type | String | Detection summary (person, vehicle, pet, package, etc.) |
| records[].recordPath | String | Cloud path |
| records[].recordRegionId | String | Recording partition id |
| records[].region | String | Resource region id for download auth |
| records[].expireTime | String | Expiry timestamp |
| records[].streamAddr | String | Download host |
| records[].userId | String | User id for client playback |
| records[].ak | String | Auth access key |
| records[].fileToken | String | File auth token |
| records[].businessType | String | e.g. 712 (m3u), 713 (dav) |
| records[].method | String | 0 legacy highlight; 1 new scheme |
| records[].mp4Videos | Array | Frame picks / segments (new scheme) |
| records[].mp4Videos[].tags | String / Array | Tags (person, vehicle, pet, package, etc.) |
| records[].mp4Videos[].timePoint | String | Time point |
| records[].mp4Videos[].duration | String / Integer | Segment duration |
| records[].mp4Videos[].summary | String | AI summary text |
| records[].mp4Videos[].createTime | String / Long | Created at |
| records[].mp4Videos[].updateTime | String / Long | Updated at |
| records[].mp4Videos[].expireTime | String / Long | Expiry timestamp |
Sample output
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"data": {
"records": [
{
"recordId": "3304819",
"deviceId": "TESTQWERXXXX",
"channelId": "0",
"encryptMode": "1",
"channelName": "Store camera 1",
"createTime": "20260423T000000",
"size": 238037,
"length": 22,
"thumbUrl": "http://example.com/thumb",
"type": "Package",
"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": "Multiple people in the office",
"expireTime": 1779850855000,
"createTime": 1777258855000,
"timePoint": "10:00",
"updateTime": 1777258855000,
"tags": [
"Person"
]
}
]
}
]
},
"code": "0",
"msg": "The operation was successful"
}
}
Error codes
This method may return the codes below. See Error codes and Capability errors for the full catalog.
Gateway and auth (SN / TK / OP)
| Code | Meaning | Next step |
|---|---|---|
SN1001 | Signature error | Check sign per Signature |
TK1002 | Token invalid or expired | Refresh accessToken |
OP1002 | Missing required parameter | Add required fields |
OP1003 | Invalid parameter | Match this page’s parameter table |
OP1009 | Permission denied | Check token and device bind/share grants |
OP1013 | Total call limit exceeded | Reduce call rate |
OP1014 | Daily per-interface limit exceeded | See Interface call limits |
DV1007 | Device offline | Wait until the device is online |
See Error codes · OP/SN/TK for the full catalog.
Sub-accounts (SUB)
| Code | Meaning | Next step |
|---|---|---|
SUB1001–SUB1002 | Sub-account lacks API permission | Update policy via addPolicy |
SUB1005 | Sub-account token expired | Refresh subAccountToken |
SUB1006 | No device grant for sub-account | Check Resource and device serial |
SUB1008 | Sub-account not bound to app | Create and bind the sub-account first |
See Error codes · SUB.
Device access and channels (DV10xx)
| Code | Meaning | Next step |
|---|---|---|
DV1007 | Device offline or timeout | Wait for the device to come online |
DV1009 | Device busy | Retry later |
DV1012 | Insufficient share/grant permission | Check sub-account Permission / Resource |
DV1019 | Capability not supported | Confirm model and capability list |
DV1020 | Channel offline | Check channel status |
DV1026 | Function not supported | Use another API or upgrade firmware |
DV1028 | Not bound or channel missing | Verify deviceId / channelId |
See Error codes · DV.
Cloud recording (RC)
| Code | Meaning | Next step |
|---|---|---|
RC1001 | Cloud record does not exist | Verify time range and device |
RC1002 | Cloud record query failed | Retry or check cloud storage status |
Notes
Sub-account tokens need at least Permission RecordReplay and Resource cam:{deviceId}:{channelId}. See Permission codes.
