device.message.search (Search messages by type)
device.message.search: Search messages by type
What it does
Search capability event history by message type. Same response shape as Query alarm history: data.count, data.nextAlarmId, data.messages. Each messages[] entry matches Receive alarm messages. msgType equals eventId.
Legacy alarm / deviceStatus push types are not queried here; see Receive device messages.
beginTime / endTime are device-local yyyyMMdd'T'HHmmss, e.g. 20201022T000000. Do not use Unix seconds or UTC from time-sync APIs.
Platform fields are not inside capability outputData.
Request URL
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.message.search
Minimum permission
Administrator on bound devices: no extra permission. Shared devices: alarm message permission. Sub-user bound devices: none. Sub-account: per-message share/sub codes (see Permission codes). Only authorized events returned. Device must be bound.
Request parameters
| Name | Type | Required | Default | Valid values | Description |
|---|---|---|---|---|---|
token | String | yes | accessToken | ||
deviceId | String | yes | Device serial number | ||
productId | String | no | Optional. If sent and it does not match the device model → DV2009 | ||
channelId | String | no | IPC often "0" | Omit: device-level; set: channel | |
labelType | String | yes | e.g. humanAlarm | Message type label | |
beginTime | String | yes | Device-local yyyyMMddTHHmmss | Start time | |
endTime | String | yes | Device-local yyyyMMddTHHmmss | End time | |
nextAlarmId | String | no | "-1" or cursor | Paging |
Request example
{
"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": "TESTIPC000012345",
"channelId": "0",
"labelType": "humanAlarm",
"beginTime": "20201022T000000",
"endTime": "20201022T235959",
"nextAlarmId": "-1"
}
}
Response data fields
Same as Query alarm history messages[] table (including optional feedback on history).
Response example
See Query alarm history.
Error codes
This API may return the codes below.
Unauthorized events are filtered per row.
include 未找到:06.dv20-message.md
