Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
  • API reference
    • Public conventions
    • Development specification
    • accessToken: Get administrator token
    • API request example
    • Error codes
    • Interface call limits
    • Account docking
    • Device APIs
    • Device live broadcast
    • Push configuration
    • Cloud storage service
    • Resource pool quota
    • AI analysis
    • AI Insight
      • bindDeviceAiInsight: Enable AI Insight package
      • unbindDeviceAiInsight: Unbind AI Insight package
      • queryDeviceAiInsight: Query active AI Insight package
      • queryDeviceAiInsightList: List AI Insight packages on channel
      • queryAiInsightCount: Query AI Insight purchase quota
      • queryUnusedAiInsightList: List unused AI Insight packages
      • setDeviceAiInsightSwitch: Set AI Insight service switch
      • activateDeviceAiInsight: Activate queued AI Insight package
      • setDeviceAiLanguage: Set channel AI language
      • addAiInsightFeature: Add face library member
      • updateAiInsightFeature: Update face library member
      • addAiInsightFaceImages: Append face registration images
      • deleteAiInsightFaceImages: Delete face registration images
      • listAiInsightFeature: List registered face members
      • deleteAiInsightFeature: Delete face members
      • listAiInsightUnknownFace: List unknown face clusters
      • deleteAiInsightUnknownFace: Delete unknown face images
      • queryCondensedRecordBitmap: Query AI Insight highlight calendar mask
      • getCondensedRecords: Query AI Insight highlight clips
      • searchAiAlarmMessageByPage: Search alarm messages by keyword
      • getAlarmMessageStatistics: Daily alarm statistics and safety report
      • reportAiMsgFeedback: Submit AI smart-alarm accuracy feedback
    • Legacy APIs (deprecated)
  • SDK and tools
  • Solutions
  • Platform and support
On this page
What it does
Request URL
Minimum permission
Request parameters
Sample input
Response data fields
Sample output
Error codes
Notes
Related

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 nameParameter typeRequired or notParameter description
tokenStringYesAdministrator or sub-account accessToken
deviceIdStringYesDevice serial number
channelIdStringYesChannel ID; always pass for integration. Sub-account Resource must include cam:{deviceId}:{channelId} Allowed values: Integer ≥ 0.
productIdStringNoThing-model product ID (optional)
beginTimeStringYesStart time Allowed values: yyyy-MM-dd HH:mm:ss.
endTimeStringYesEnd time; must be ≥ beginTime Allowed values: yyyy-MM-dd HH:mm:ss.
packageTypeStringYesSame as queryCondensedRecordBitmap Allowed values: aiInsight, aiCloudRecord.
recordIdStringNoPagination cursor: -1 or omit on first page; next page uses last item recordId
countIntegerYesPage 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 nameField typeDescription
recordsArrayHighlight clip list
records[].recordIdLongHighlight clip id
records[].productIdStringThing-model product id (if present)
records[].deviceIdStringDevice serial number
records[].channelIdStringChannel ID
records[].channelNameStringChannel name
records[].encryptModeString0 default encryption; 1 user encryption
records[].createTimeStringCreated at, yyyyMMddTHHmmss
records[].sizeIntegerSize in bytes
records[].lengthIntegerDuration in seconds
records[].thumbUrlStringThumbnail URL
records[].typeStringDetection summary (person, vehicle, pet, package, etc.)
records[].recordPathStringCloud path
records[].recordRegionIdStringRecording partition id
records[].regionStringResource region id for download auth
records[].expireTimeStringExpiry timestamp
records[].streamAddrStringDownload host
records[].userIdStringUser id for client playback
records[].akStringAuth access key
records[].fileTokenStringFile auth token
records[].businessTypeStringe.g. 712 (m3u), 713 (dav)
records[].methodString0 legacy highlight; 1 new scheme
records[].mp4VideosArrayFrame picks / segments (new scheme)
records[].mp4Videos[].tagsString / ArrayTags (person, vehicle, pet, package, etc.)
records[].mp4Videos[].timePointStringTime point
records[].mp4Videos[].durationString / IntegerSegment duration
records[].mp4Videos[].summaryStringAI summary text
records[].mp4Videos[].createTimeString / LongCreated at
records[].mp4Videos[].updateTimeString / LongUpdated at
records[].mp4Videos[].expireTimeString / LongExpiry 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)

CodeMeaningNext step
SN1001Signature errorCheck sign per Signature
TK1002Token invalid or expiredRefresh accessToken
OP1002Missing required parameterAdd required fields
OP1003Invalid parameterMatch this page’s parameter table
OP1009Permission deniedCheck token and device bind/share grants
OP1013Total call limit exceededReduce call rate
OP1014Daily per-interface limit exceededSee Interface call limits
DV1007Device offlineWait until the device is online

See Error codes · OP/SN/TK for the full catalog.

Sub-accounts (SUB)

CodeMeaningNext step
SUB1001–SUB1002Sub-account lacks API permissionUpdate policy via addPolicy
SUB1005Sub-account token expiredRefresh subAccountToken
SUB1006No device grant for sub-accountCheck Resource and device serial
SUB1008Sub-account not bound to appCreate and bind the sub-account first

See Error codes · SUB.

Device access and channels (DV10xx)

CodeMeaningNext step
DV1007Device offline or timeoutWait for the device to come online
DV1009Device busyRetry later
DV1012Insufficient share/grant permissionCheck sub-account Permission / Resource
DV1019Capability not supportedConfirm model and capability list
DV1020Channel offlineCheck channel status
DV1026Function not supportedUse another API or upgrade firmware
DV1028Not bound or channel missingVerify deviceId / channelId

See Error codes · DV.

Cloud recording (RC)

CodeMeaningNext step
RC1001Cloud record does not existVerify time range and device
RC1002Cloud record query failedRetry or check cloud storage status

See Error codes · catalog.

Notes

Sub-account tokens need at least Permission RecordReplay and Resource cam:{deviceId}:{channelId}. See Permission codes.

Related

  • Development specification
  • AI Insight module index
  • queryCondensedRecordBitmap: Query AI Insight highlight calendar mask
  • Signing conventions
  • Common request payload
queryCondensedRecordBitmap: Query AI Insight highlight calendar mask
searchAiAlarmMessageByPage: Search alarm messages by keyword