LockEvent
Represents an event that has occurred for a Lock on the CORE Platform. Some examples of LockEvents are Users using a Kwikset Kevo’s Tap to Open / Tap to Lock functionality, or the Lock reporting a low battery state.
Current manual bolt turns (e.g. via physical key or from the interior handle) will not trigger events, nor will the Kwikset Kevo’s triple-tap to lock feature. Locks/unlocks via Key Fob also will not appear.
The LockEvent object
Attributes
Name |
Type |
Description |
id |
UUID |
The ID of the LockEvent |
type |
String |
The LockEvent type (see: LockEvent Types) |
lock_id |
UUID |
The ID of the Lock this event is for |
performer |
User |
The User who performed the LockEvent (if applicable) |
timestamp |
DateTime |
When this LockEvent occurred |
value |
Float |
A reported value corresponding with the given event, for example battery level on a 0-1 scale (if applicable). |
Lock Event Types
Name |
Description |
lock |
The Lock was locked |
unlock |
The Lock was unlocked |
battery |
The Lock battery status has changed |
Available APIs
GET
/locks/{lock_id}/events?type={type}
Returns a paginated list of LockEvents for a Lock that the User has granted permission to
Request Properties
Name |
Type |
Description |
lock_id |
UUID |
Required The ID of the Lock to return LockEvents for |
type |
String |
[Optional], [QueryString] The type of LockEvent you’d like to filter by. Joinable by , |
Response Properties
Name |
Type |
Description |
id |
UUID |
The ID of the LockEvent |
type |
String |
The LockEvent type (see: Lock Event Types) |
lock_id |
UUID |
The ID of the Lock this LockEvent is for |
performer |
User |
The User who performed the LockEvent (if applicable) |
timestamp |
DateTime |
When this LockEvent occurred |
value |
Float |
A reported value corresponding with the given event, for example battery level on a 0-1 scale (if applicable). |
Example Request
GET /locks/2b903516-4e8c-4a20-be92-ef4ac50c027d/events
Example Response
{
"lock_events": [
{
"id": "ace959ab-629b-4247-8311-f49b941758fa",
"type": "lock",
"lock_id": "2b903516-4e8c-4a20-be92-ef4ac50c027d",
"performer": {
"id": "9b41ec94-26c4-4b73-95dc-dbd12b59bec0",
"name": "Sidney Crosby"
},
"timestamp": "2016-05-11T16:42:34.342Z"
},
{
"id": "de84f249-c930-4d74-b88c-2284c928170a",
"type": "unlock",
"lock_id": "2b903516-4e8c-4a20-be92-ef4ac50c027d",
"performer": {
"id": "f8f4e467-7809-4ee2-96dc-a1ac0d618835",
"name": "Phil Kessel"
},
"timestamp": "2016-05-11T17:27:43.546Z"
},
{
"id": "23cca49c-cc17-45e0-b058-1affcab8f5e6",
"type": "battery",
"lock_id": "2b903516-4e8c-4a20-be92-ef4ac50c027d",
"timestamp": "2016-05-11T18:25:43.511Z",
"value": 0.9
}
],
"metadata": {
"limit": 3,
"count": 500,
"previous": "/locks/2b903516-4e8c-4a20-be92-ef4ac50c027d/events?limit=3&after=7790d316-b1bc-48e3-8759-5d722d30545e",
"next": "/locks/2b903516-4e8c-4a20-be92-ef4ac50c027d/events?limit=3&after=23cca49c-cc17-45e0-b058-1affcab8f5e6"
}
}