Event Schema

Messages routed through the Event Hub are serialized JSON objects and follow this schema definition, with event specific data being contained as a JSON object within the Content property.

Event Hub object schema

ModuleID
string

ID of the module that generated the message.

object
SiteID
integer

Configured SiteID of the originating Event Hub

MAC
string

MAC address of the generating device (if applicable)

GatewayURI
string

A URI that specifies the source network route to a device of the form ZK://{SiteID}::{GatewayID}::{ExternalSource}). ExternalSource may be a UDP end-point for Power-over-Ethernet devices of the form UDP::{Host}:{Port}, or may be a USB connected gateway of the form USB::{DeviceID}.

Category
string

Category of the Event, common categories are:

Category Description
POSITION Messages containing position updates from the devices
GATEWAY Raw messages received from the gateway devices
ZONE Zone alerts from the Zone module
HARDWARE Hardware events, such as button presses, battery level updates, and other actionable events
SYSTEM System-level events, e.g. admin shutdown
API API operation that has been relayed over the Event Hub
Type
string

Sub-category that further identifies the purpose of the event and is specific to each category.

Timestamp
string

An ISO 8601 style timestamp with 1ms precision of the format YYYY-MM-DDThh:mm:ss.ssssZ

object

Event-specific JSON object data.

property name*
additional property
any
{
  • "ModuleID": "cae534a0-cb29-4d22-a16c-70f764aedbcb",
  • "Source": {
    },
  • "Category": "HARDWARE",
  • "Type": "BATTERY_LEVEL",
  • "Timestamp": "",
  • "Content": {
    }
}