Access Event API


Access Event API

The Access Event API provides access to retrieve events generated by the Gateway Controller at each managed facility.

API Routes and Documentation

The Access Control service name is “accessevent”, which can be substituted into the route prefix format of the selected environment (e.g. https://accessevent.insomniaccia.com ). The Swagger documentation can be found by appending “/swagger” to the route prefix (e.g. https://accessevent.insomniaccia.com/swagger ). To the view the appropriate documentation, select “v3.0” from the drop-down. The v1.0 and v2.0 APIs exist for legacy support only and are subject to deprecation in the future. Like all OpenTech IoE APIs, service routes are available for checking the availability and health of the service.

Calling the API

Every authorized request to the API requires an “Authorization” header. The authorization header indicates to the API that you are using bearer token authentication using your JWT access token acquired from the Authorization API.

Example CURL

API calls will return one of the following responses:

  • 200 OK – Your request was successful, and the response body will contain additional data.
  • 400 Bad Request – Your request has invalid data, and the response body will give reasons for the invalid response.
  • 401 Unauthorized – Your authorization token is expired.
  • 403 Forbidden – You tried to access a resource or operation that is not available to your credentials.
  • 404 Not Found – You tried to access a resource that does not exist or is not visible with your credentials.
  • 5XX – The server has encountered an internal error or network timeout and you should retry your request.

Gateway Event Routes

These routes allow you to retrieve the gateway events by facility or for the entire account. Data available via these routes are typically limited to the last 180 days. Some notable operations include:

  • GET /gatewayevents/accounts/[accountId]
    • Retrieve all gateway events for the specified account ID, with the option to page the results and filter by event types, facility IDs, and date ranges.
    • See Swagger documentation for specific details.
    • A maximum of 10,000 results can be retrieved at once.
    • Adding /export to the route will export the data in CSV format.
  • GET /gatewayevents/facilities/[facilityId]
    • Retrieve all gateway events for the specified facility ID, with the option to page the results and filter by event types and date ranges.
    • See Swagger documentation for specific details.
    • A maximum of 10,000 results can be retrieved at once.
    • Adding /export to the route will export the data in CSV format.

Gateway Event Types

The following table describes the available Gateway Event types that are sent by the Gateway Controller (GWC).

EnumNameDescription
1Generic MessageSends a message to the cloud
3Command ReceivedAcknowledges receipt of a command
5Health StatusCommunication and Counter statistics for devices
8Facility OpenedStart of Open Hours time group configured for facility
9Facility ClosedEnd of Open Hours time group configured for facility
10Door AlarmPresence or clearance of a door alarm
11Device OfflineA device has missed a number of heartbeats to GWC
12Device OnlineA device has begun communicating with GWC
15Invalid PasswordVisitor was denied access at a keypad due to invalid code (via manual input or Storage Genie)
16Invalid Access AreaVisitor was denied access at a keypad that was not in their access profile (via manual input or Storage Genie)
17DelinquentVisitor was denied access at a keypad due to assignment to a delinquent unit (via manual input or Storage Genie)
18Access GrantedVisitor has been granted access by a keypad (via manual input or Storage Genie)
19Invalid Access TimeVisitor was denied access at a keypad due to the current time being outside of their time group (via manual input or Storage Genie)
20Text Me My CodeVisitor entered their mobile number via a keypad to retrieve their code
24Loitering LockoutVisitor was denied access at a keypad due to loitering onsite (via manual input or Storage Genie)
25Mark Visitor OffsiteVisitor was automatically marked offsite by GWC
26TamperPresence of clearance of a tamper alarm for a device-specific
27Gateway Temporary Code AddedTemporary code added via local GWC web interface
28Gateway Visitor Status ChangedVisitor status changed via local GWC web interface
29Action Group Log MessageAction to send message to cloud executed as part of action group
30Time or Time Zone ChangedGWC registered a change in time zone via local web interface or from cloud
31Emergency AccessEnable or disable of emergency access status, which holds open responsive relays when enabled
32Facility Access LockdownEnable or disable of facility access lockdown, which blocks keypad activity when enabled
33Unit Door OpenedUnit Alarm Board indicates a unit door has opened
34Unit Door ClosedUnit Alarm Board indicates a unit door has closed
35Unit Door AlarmUnit Alarm Board indicates presence of a unit door alarm
36Device DetectedA new or updated device is detected by GWC
37Device Component StatusA relay, input or door alarm has changed state
38Device PairingDevice pairing has changed via local GWC web interface
39Profile Transition StatusGWC is transitioning from one environmental profile to another

Gateway Commands and Suppression

Requests that change data, such as creating a new unit or updating a visitor, create a new command for the Gateway Controller at the facility to retrieve the updated data.

The Access Control API supports options for suppressing commands when performing several consecutive updates. However, this option is no longer recommended and will likely be revised or deprecated in the future. Similarly, the routes for initiating unit and visitor refreshes will similarly be revised or deprecated in the future.