Getting Started
Official Site
Getting Started
Official Site
  • Document description
  • Read before you start

  • Light application development guide

  • Mobile application development guide

  • Cloud live development guide

  • Desktop application development guide

  • Third party development guide

  • Message push development guide

  • IoT things data model

  • HTTP interface

    • Development specification
    • API privacy policy
    • Postman interface simulation call
    • accessToken: Get administrator token
    • API request example
    • Account docking
    • Push configuration
    • Cloud storage service
    • Equipment management

    • Device configurat

    • Video equipment

    • Device message
      • deleteAlarmMessage: Delete alarm message
      • getAlarmMessage: Query user alarm information
    • Device live broadcast
    • Device lock access
  • Reference documents

On this page
Function details
Request address
Minimum permissions required for sub-account token request
Incoming parameter description
Sample input
Return data field description
Sample output

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 nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesAdministrator or sub-account accessToken
deviceIdStringYesDevice serial number
channelIdStringYesChannel Number
beginTimeStringYesStart time, yyyy-MM-dd HH:mm:ss
endTimeStringYesEnd time, yyyy-MM-dd HH:mm:ss
countIntegerNo30[1,30]The total number of alarms extracted, [1,30] a positive integer
nextAlarmIdStringNo"-1""","-1", the nextAlarmId returned by the last querythe 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"
}
deleteAlarmMessage: Delete alarm message
bindDeviceLive: Create device source live address