getAlarmMessage: Query user alarm information
getAlarmMessage: Query user alarm information
Function details
Get the device message list of the device channel in the specified time period.
Request address
https://openapi-[DataCenter].easy4ip.com/openapi/getAlarmMessage
Minimum permissions required for sub-account token request
"Permission":"Alarm" "Resource":"cam:serial number:channel number"
Incoming parameter description
| Parameter name | Parameter type | Required or not | Default value | Legal value | Parameter description |
|---|---|---|---|---|---|
| token | String | Yes | Administrator or sub-account accessToken | ||
| deviceId | String | Yes | Device serial number | ||
| channelId | String | Yes | Channel Number | ||
| beginTime | String | Yes | Start time, yyyy-MM-dd HH:mm:ss | ||
| endTime | String | Yes | End time, yyyy-MM-dd HH:mm:ss | ||
| count | Integer | No | 30 | [1,30] | The total number of alarms extracted, [1,30] a positive integer |
| nextAlarmId | String | No | "-1" | "","-1", the nextAlarmId returned by the last query | the next alarm Id |
Sample input
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"97aceb46f9e847b01eeec6b82daafffc",
"time":1603350704,
"nonce":"245db3c7-1689-4893-ac30-cbd7a9d8d153"
},
"id":"9f05aa70-91fd-4d35-8b06-cd2ece55346b",
"params":{
"count":"10",
"beginTime":"2020-10-22 00:00:00",
"endTime":"2020-10-22 23:59:59",
"deviceId":"TESTQWERXXXX",
"channelId":"0",
"nextAlarmId":"-1",
"token":"At_00000ad9e6e87f0142eb92e207aec46a"
}
}
Return data field description
| Field name | Field type | Field description | |
|---|---|---|---|
| count | Integer | Total number of current extracted alarms | |
| alarms | token | String | The unique identifier of the message, used to query cloud recordings |
| time | Long | UNIX timestamp of alarm time (unit: second) | |
| channelId | String | Channel number | |
| name | String | Channel name | |
| alarmId | Long | Message Id | |
| localDate | String | The local time of the device at the time of alarm | |
| type | Integer | Alarm type, 0: human infrared; 1: dynamic detection; 2: unknown alarm; 3: low voltage alarm; 4: infrared detection of accessories human body; 5: movement event of the mobile sensor; 6: long-term movement of the mobile sensor No movement event occurred; 7: Long-term non-alarm event due to infrared detection of accessory human body; 8: Door sensor alarm event; 90: Alarm gateway door sensor detection alarm; 91: Alarm gateway infrared detection alarm; 92: Alarm gateway low battery alarm; 93: Alarm gateway tampering alarm | |
| deviceId | String | Device ID | |
| picurlArray | String[] | Alarm picture url | |
| thumbUrl | String | Thumbnail Url | |
| nextAlarmId | Long | The message Id of the last message in the current message list | |
Sample output
{
"result":{
"msg":"successful operation。",
"code":"0",
"data":{
"alarms":[
{
"alarmId":"1726360834259136",
"name":"TP1S-1842",
"time":1603350842,
"localDate":"2020-10-22 15:14:02",
"type":"1",
"thumbUrl":"https://lechangecloud-private-alarmpic.oss-cn-hangzhou.aliyuncs.com/lechange/TESTQWERXXXX_img/Alarm/0/07540ab39e82488490b232977c333c9e_0_thumb_qcif.dav?Expires=1603437367&OSSAccessKeyId=LTAIGz9JykwmdCyV&Signature=ezBOlF5Xc0y%2Bw3fnSTThivNn%2BFE%3D",
"deviceId":"TESTQWERXXXX",
"picurlArray":[
"https://lechangecloud-private-alarmpic.oss-cn-hangzhou.aliyuncs.com/lechange/TESTQWERXXXX_img/Alarm/0/07540ab39e82488490b232977c333c9e_0.jpg?Expires=1603437367&OSSAccessKeyId=LTAIGz9JykwmdCyV&Signature=VpQAeZAMd7qJfr0jZ8eNdztmkRU%3D"
],
"channelId":"0",
"token":"07540ab39e82488490b232977c333c9e"
},
{
"alarmId":"1726360340019392",
"name":"TP1S-1842",
"time":1603350721,
"localDate":"2020-10-22 15:12:01",
"type":"1",
"thumbUrl":"https://lechangecloud-private-alarmpic.oss-cn-hangzhou.aliyuncs.com/lechange/TESTQWERXXXX_img/Alarm/0/ccea3589e6484646b0bc9f97f45dd8c5_0_thumb_qcif.dav?Expires=1603437367&OSSAccessKeyId=LTAIGz9JykwmdCyV&Signature=hCrs7STrJl7AZLKC0qGjLV%2BprXk%3D",
"deviceId":"TESTQWERXXXX",
"picurlArray":[
"https://lechangecloud-private-alarmpic.oss-cn-hangzhou.aliyuncs.com/lechange/TESTQWERXXXX_img/Alarm/0/ccea3589e6484646b0bc9f97f45dd8c5_0.jpg?Expires=1603437367&OSSAccessKeyId=LTAIGz9JykwmdCyV&Signature=iKH6890wqp6IMnhXBPg50a%2F05XE%3D"
],
"channelId":"0",
"token":"ccea3589e6484646b0bc9f97f45dd8c5"
}
],
"count":2,
"nextAlarmId":1726360340019392
}
},
"id":"9f05aa70-91fd-4d35-8b06-cd2ece55346b"
}
