getAlarmMessage:查询用户报警信息

功能详情

获取设备通道在指定时间段内的设备消息列表。

请求地址

https://openapi.lechange.cn/openapi/getAlarmMessage

传入参数说明

参数名 参数类型 是否必填 默认值 合法值 参数说明
token String 授权Token
deviceId String 设备序列号
channelId String 通道号
beginTime String 开始时间,yyyy-MM-dd HH:mm:ss
endTime String 结束时间,yyyy-MM-dd HH:mm:ss
count Integer 30 [1,30] 抽取的报警总数,[1,30]正整数
nextAlarmId String "-1" "","-1",上次查询返回的nextAlarmId 下一报警Id

样例输入

{
    "system":{
        "ver":"1.0",
        "appId":"lcd08b4b07ce224508",
        "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":"MEGREZ0000001842",
        "channelId":"0",
        "nextAlarmId":"-1",
        "token":"At_00000ad9e6e87f0142eb92e207aec46a"
    }
}

返回data字段说明

字段名 字段类型 字段说明
count Integer 当前抽取报警总数
alarms token String 消息唯一标识,用于查询云录像
time Long 报警时间UNIX时间戳(单位:秒)
channelId String 通道号
name String 通道名称
alarmId Long 消息Id
localDate String 报警时设备本地时间
type Integer 报警类型,0:人体红外;1:动态检测;2:未知告警;3:低电压告警;4:配件人体红外检测;5:移动感应器发生移动事件;6:移动感应器长时间未发生移动事件;7:配件人体红外检测长久未报警事件;8:门磁报警事件;90:报警网关门磁探测报警;91:报警网关红外探测报警;92:报警网关低电量报警;93:报警网关防拆报警
deviceId String 设备ID
picurlArray String[] 报警图片url
thumbUrl String 缩略图Url
nextAlarmId Long 当前消息列表最后一条消息的消息Id

样例输出

{
    "result":{
        "msg":"操作成功。",
        "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/MEGREZ0000001842_img/Alarm/0/07540ab39e82488490b232977c333c9e_0_thumb_qcif.dav?Expires=1603437367&OSSAccessKeyId=LTAIGz9JykwmdCyV&Signature=ezBOlF5Xc0y%2Bw3fnSTThivNn%2BFE%3D",
                    "deviceId":"MEGREZ0000001842",
                    "picurlArray":[
                        "https://lechangecloud-private-alarmpic.oss-cn-hangzhou.aliyuncs.com/lechange/MEGREZ0000001842_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/MEGREZ0000001842_img/Alarm/0/ccea3589e6484646b0bc9f97f45dd8c5_0_thumb_qcif.dav?Expires=1603437367&OSSAccessKeyId=LTAIGz9JykwmdCyV&Signature=hCrs7STrJl7AZLKC0qGjLV%2BprXk%3D",
                    "deviceId":"MEGREZ0000001842",
                    "picurlArray":[
                        "https://lechangecloud-private-alarmpic.oss-cn-hangzhou.aliyuncs.com/lechange/MEGREZ0000001842_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"
}

results matching ""

    No results matching ""