LockGet lock event history

Get lock event history

Returns paginated event history from R2. Default: last 10 events. Use ?page=N for older events.

curl -X GET "https://api.spkey.co/locks/123/events?page=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "aggregateId": "example_string",
  "totalEvents": 3.14,
  "page": 3.14,
  "pageSize": 3.14,
  "totalPages": 3.14,
  "events": [
    {
      "aggregateType": "example_string",
      "aggregateId": "example_string",
      "version": 3.14,
      "type": "example_string",
      "timestamp": "example_string",
      "orgId": "example_string",
      "event": "null"
    }
  ]
}
GET
/locks/{id}/events
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
idinteger
Required

Lock ID (numeric)

query
pagestring

Page number (1-based). Default: last page (most recent events)

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

idinteger
Required

Lock ID (numeric)

Query Parameters

pagestring

Page number (1-based). Default: last page (most recent events)

Responses

aggregateIdstring
Required
totalEventsnumber
Required
pagenumber
Required
pageSizenumber
Required
totalPagesnumber
Required
eventsarray
Required