Export unlock records
https://cnapi.sciener.com/v3/lockRecord/listForExport
Get the full amount of lock operation records for export.
The cloud only keeps the last six months of records, so only the last six months of records are allowed to be exported.
Because it is not paged, full-volume acquisition, the interface will be very heavy when there are a lot of records, so the interface has access frequency limitations: the interface limits a user to a maximum of 5 calls a minute, 100 times a day; a maximum of 500 calls a day for an application, more than the call frequency limit, it will return an error code: 30006.
1 Request example
javascript
curl --location --request GET 'https://cnapi.sciener.com/v3/lockRecord/listForExport?clientId=4773aa036f7f49c68d876bb4be85c80c&accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f&lockId=163377&startDate=1526674054000&endDate=1626674054000&date=1626674054000'2 Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| startDate | Long | N | Start time, search by operate time(timestamp in millisecond) |
| endDate | Long | N | End time, search by operate time (timestamp in millisecond) |
| date | Long | Y | Current time (timestamp in millisecond) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| list | JSONArray | list of records |
The objects in the list
| Parameter | Type | Description |
|---|---|---|
| lockId | Int | Lock ID |
| recordTypeFromLock | Int | Record type from lock,refer to: Record type from lock |
| recordType | Int | Record type, refer to: Record type from cloud for details |
| success | Int | Is success: 0-No, 1-Yes |
| username | String | Operator account or username: APP user account for records of unlocking by APP password name for records of unlocking by passcodes Card name for records of unlocking by cards Fingerprint name for records of unlocking by fingerprints |
| keyboardPwd | String | Passcode, card number or fingerprint number |
| date | Long | Operate time on the lock (timestamp in millisecond). |
{
"list": [
{
"lockId": 163377,
"recordTypeFromLock": 1,
"recordType": 1,
"success":1,
"username": "alex@google.com",
"date": 1616674054000},
{
"lockId": 163377,
"recordTypeFromLock": 4,
"recordType": 4,
"success":1,
"username": "小明",
"keyboardPwd": "383834",
"date": 1616675054000}
]
}