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).
Enum | Name | Description |
---|---|---|
1 | Generic Message | Sends a message to the cloud |
3 | Command Received | Acknowledges receipt of a command |
5 | Health Status | Communication and Counter statistics for devices |
8 | Facility Opened | Start of Open Hours time group configured for facility |
9 | Facility Closed | End of Open Hours time group configured for facility |
10 | Door Alarm | Presence or clearance of a door alarm |
11 | Device Offline | A device has missed a number of heartbeats to GWC |
12 | Device Online | A device has begun communicating with GWC |
15 | Invalid Password | Visitor was denied access at a keypad due to invalid code (via manual input or Storage Genie) |
16 | Invalid Access Area | Visitor was denied access at a keypad that was not in their access profile (via manual input or Storage Genie) |
17 | Delinquent | Visitor was denied access at a keypad due to assignment to a delinquent unit (via manual input or Storage Genie) |
18 | Access Granted | Visitor has been granted access by a keypad (via manual input or Storage Genie) |
19 | Invalid Access Time | Visitor was denied access at a keypad due to the current time being outside of their time group (via manual input or Storage Genie) |
20 | Text Me My Code | Visitor entered their mobile number via a keypad to retrieve their code |
24 | Loitering Lockout | Visitor was denied access at a keypad due to loitering onsite (via manual input or Storage Genie) |
25 | Mark Visitor Offsite | Visitor was automatically marked offsite by GWC |
26 | Tamper | Presence of clearance of a tamper alarm for a device-specific |
27 | Gateway Temporary Code Added | Temporary code added via local GWC web interface |
28 | Gateway Visitor Status Changed | Visitor status changed via local GWC web interface |
29 | Action Group Log Message | Action to send message to cloud executed as part of action group |
30 | Time or Time Zone Changed | GWC registered a change in time zone via local web interface or from cloud |
31 | Emergency Access | Enable or disable of emergency access status, which holds open responsive relays when enabled |
32 | Facility Access Lockdown | Enable or disable of facility access lockdown, which blocks keypad activity when enabled |
33 | Unit Door Opened | Unit Alarm Board indicates a unit door has opened |
34 | Unit Door Closed | Unit Alarm Board indicates a unit door has closed |
35 | Unit Door Alarm | Unit Alarm Board indicates presence of a unit door alarm |
36 | Device Detected | A new or updated device is detected by GWC |
37 | Device Component Status | A relay, input or door alarm has changed state |
38 | Device Pairing | Device pairing has changed via local GWC web interface |
39 | Profile Transition Status | GWC 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.