Get Alert Records

Last Updated on : 2024-05-09 08:11:30download

Get alert records of a smart lock.

API address

GET: /v1.0/devices/{device_id}/door-lock/alarm-logs

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
page_noIntegerquerytrueThe page number.
page_sizeIntegerquerytrueThe number of items returned on each page.
codesStringqueryfalseThe codes of standard data points of alerts, separated with half-width commas (,). Valid values:
  • hijack: duress alert.
  • alarm_lock: general alert. Default value.
  • doorbell: doorbell prompt.

Return parameter

Parameter nameTypeDescription
resultPagination

Description of result

Parameter nameTypeDescription
totalIntegerThe total number of alert records.
recordsListThe list of alert records.

Description of records

Parameter nameTypeDescription
statusListThe list of lock alerts.
update_timeLongThe time when the status is updated.
nick_nameStringThe username.

Description of status

Parameter nameTypeDescription
codeStringDP code of alerts.
valueObjectStatus value. The value of the duress alarm is the unlocking method number of the standard status code set to trigger a duress event.

Request example

GET: /v1.0/devices/vdevo15345926009****/door-lock/alarm-logs?page_no=1&page_size=20&dp_codes=hijack

Return example

{
    "result": {
        "records": [
            {
                "update_time": 1543297979,
                "status": {
                    "code": "hijack",
                    "value": "unlock_fingerprint-02"
                }
            }
        ],
        "total": 1
    },
    "t": 1542626129429,
    "success": true
}

Error code

For more information, see error code.