Skip to main content
Version: 2.0

New Architecture

We recently introduced our new 2.0 architecture, which is now the default architecture for newly created systems. New integrations should support 2.0 exclusively, while existing integrations may need to support both 1.0 and 2.0 for a period of time. The differences between these two architectures are detailed below.

info

Customers using the 2.0 architecture will have a systemId in their organization object.

1.0 Architecture

In the 1.0 architecture, an on-premise cloud node is the source of truth for people, credentials, groups, and rules. If your users need access to multiple geographic locations, a cloud node will be required for each location, and synchronization between these cloud nodes must be handled by your integration.

2.0 Architecture

In the 2.0 architecture, a cloud-based system is the source of truth for people, credentials, groups, and rules. Systems can be thought of as virtual cloud nodes. One or more physical cloud nodes can be connected to a single system, with people, credentials, groups, and rules synchronized automatically in real time.

Even if a system doesn't require sharing data across multiple cloud nodes, there are many benefits to this approach.

  • The system can be configured before any hardware is installed.
  • The system can be managed while hardware is offline.
  • Hardware can easily be replaced without the need to transfer data from backups.

REST API

The 2.0 architecture does not affect any 1.0 endpoints, which means existing integrations will continue to function properly for customers using the 1.0 architecture. Instead, the 2.0 architecture introduces a new set of endpoints, which are mostly identical to their 1.0 counterparts, but with a few key differences:

  • Instead of specifying a panel_id in the subdomain, a system_id is now specified in the path of the URL.
  • Some terminology has changed (e.g. persons has been replaced with holders).
  • The panel_token in the authorization header has been replaced with a system_token, which is obtained in a similar fashion.
  • Numeric IDs have been replaced with UUIDs. For example, a person_id in the 1.0 architecture represents an integer, while the equivalent holder_id in the 2.0 architecture represents a UUID string.

1.0 Architecture

POST https://panel-{{panel_id}}.pdk.io/api/persons HTTP/1.1
Authorization: Bearer {{panel_token}}
Content-Type: application/json

{
"firstName": "John",
"lastName": "Wiegand"
}

2.0 Architecture

POST https://systems.pdk.io/{{system_id}}/holders HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"firstName": "John",
"lastName": "Wiegand"
}

Streaming API

While the Streaming API can still be used for receiving real-time data, the ability to send commands via the Streaming API has been removed in the 2.0 architecture. The REST API should be used instead.

Events

Several events have been added or removed in the 2.0 architecture, and the names of most events have changed. Most notably, the entity.added, entity.modified, and entity.removed events have been replaced by more granular events, such as credential.created, credential.updated, and credential.deleted. The table below details all of these changes.

2.0 Event Name1.0 Event NameWebhooksStreamingStatus
cardformat.createdAdded
cardformat.deletedAdded
cloudnode.connectedpanel.connectedChanged
cloudnode.createdpanel.createdChanged
cloudnode.deletedpanel.deletedChanged
cloudnode.disconnectedpanel.disconnectedChanged
cloudnode.updatedpanel.updatedChanged
connection.createdAdded
connection.deletedAdded
connection.updatedAdded
controller.alarm.comloss.offendpoint.alarm.comloss.offChanged
controller.alarm.comloss.onendpoint.alarm.comloss.onChanged
controller.discoveredendpoint.discoveredChanged
controller.input.bh.stateendpoint.input.bh.stateChanged
controller.input.lp.offendpoint.input.lp.offChanged
controller.input.lp.onendpoint.input.lp.onChanged
controller.input.pb.connectedendpoint.input.pb.connectedChanged
controller.input.pb.disconnectedendpoint.input.pb.disconnectedChanged
controller.input.pb.statusendpoint.input.pb.statusChanged
controller.input.pi.offendpoint.input.pi.offChanged
controller.input.pi.onendpoint.input.pi.onChanged
controller.input.pi.statusendpoint.input.pi.statusChanged
controller.input.po.absentendpoint.input.po.absentChanged
controller.input.po.presentendpoint.input.po.presentChanged
controller.input.pp.statusendpoint.input.pp.statusChanged
controller.signalendpoint.signalChanged
credential.createdNew
credential.deletedNew
credential.updatedNew
device.alarm.forceddoor.alarm.forcedChanged
device.alarm.forced.cleareddoor.alarm.forced.clearedChanged
device.alarm.propped.alloffdoor.alarm.propped.alloffChanged
device.alarm.propped.offdoor.alarm.propped.offChanged
device.alarm.propped.ondoor.alarm.propped.onChanged
device.autoopen.offdoor.autoopen.offChanged
device.autoopen.ondoor.autoopen.onChanged
device.autoopen.override.offdoor.autoopen.override.offChanged
device.autoopen.override.ondoor.autoopen.override.onChanged
device.creatednotification.device.createdChanged
device.deletednotification.device.deletedChanged
device.forceclose.offdoor.forceclose.offChanged
device.forceclose.ondoor.forceclose.onChanged
device.forceopen.offdoor.forceopen.offChanged
device.forceopen.ondoor.forceopen.onChanged
device.input.dps.closeddoor.input.dps.closedChanged
device.input.dps.openeddoor.input.dps.openedChanged
device.input.relay.offdoor.input.relay.offChanged
device.input.relay.ondoor.input.relay.onChanged
device.input.rex.offdoor.input.rex.offChanged
device.input.rex.ondoor.input.rex.onChanged
device.input.virtualreaddoor.input.virtualreadChanged
device.request.alloweddoor.request.allowedChanged
device.request.denieddoor.request.deniedChanged
device.request.duressdoor.request.duressChanged
device.request.ecard.allowedNew
device.request.ecard.deniedNew
device.request.filteredNew
device.request.founddoor.request.foundChanged
device.request.multialloweddoor.request.multiallowedChanged
device.request.unknowndoor.request.unknownChanged
device.updatednotification.device.updatedChanged
error.bluetootherror.packetized.protocolChanged
error.card.parseerror.card.parseUnchanged
error.serverserverErrorChanged
floorgroup.activatedfloorgroup.activatedUnchanged
floorgroup.createdAdded
floorgroup.deletedAdded
floorgroup.updatedAdded
group.createdAdded
group.deletedAdded
group.updatedAdded
holder.creatednotification.person.createdChanged
holder.deletednotification.person.deletedChanged
holder.updatednotification.person.updatedChanged
log.entryliveEventChanged
organization.createdou.createdChanged
organization.deletedou.deletedChanged
organization.updatedou.updatedChanged
partition.createdAdded
partition.deletedAdded
partition.updatedAdded
permission.acceptedpermission.acceptedUnchanged
permission.createdpermission.createdUnchanged
permission.deletedpermission.deletedUnchanged
permission.updatedpermission.updatedUnchanged
rule.antipassback.violationNew
rule.createdAdded
rule.deletedAdded
rule.updatedAdded
command.result.succeedRemoved
endpoint.addedRemoved
endpoint.deletedRemoved
entity.addedRemoved
entity.modifiedRemoved
entity.removedRemoved
notification.client.commandRemoved