device.message.delete (Delete alarm messages)
device.message.delete: Delete alarm messages
What it does
Delete capability event history by alarmId or time range. By id: no permission → DV2011. By range: deletes only authorized events. Passing neither mode returns parameter error.
Legacy alarm / deviceStatus push-only traffic is not deleted through this API; see Receive device messages.
beginTime / endTime are device-local yyyyMMdd'T'HHmmss, e.g. 20201022T000000.
Request URL
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.message.delete
Minimum permission
Same as list/search (see Permission codes). By-id delete: DV2011 when unauthorized. By range: only authorized rows removed. 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 | |
alarmId | String | conditional | Required for delete-by-id | ||
beginTime | String | conditional | Device-local time | Required without alarmId | |
endTime | String | conditional | Device-local time | Required without alarmId |
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",
"alarmId": "116257862023505xxxx"
}
}
For range delete, omit alarmId and pass beginTime / endTime (and optional channelId).
Response data fields
No business fields. Success: code "0", data {}.
Response example
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"code": "0",
"msg": "Operation is successful",
"data": {}
}
}
Error codes
Pass either alarmId or a time range.
include 未找到:06.dv20-message.md
