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.
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, asystem_id
is now specified in the path of the URL. - Some terminology has changed (e.g.
persons
has been replaced withholders
). - The
panel_token
in the authorization header has been replaced with asystem_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 equivalentholder_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 Name | 1.0 Event Name | Webhooks | Streaming | Status |
---|---|---|---|---|
cardformat.created | — | ✓ | Added | |
cardformat.deleted | — | ✓ | Added | |
cloudnode.connected | panel.connected | ✓ | Changed | |
cloudnode.created | panel.created | ✓ | Changed | |
cloudnode.deleted | panel.deleted | ✓ | Changed | |
cloudnode.disconnected | panel.disconnected | ✓ | Changed | |
cloudnode.updated | panel.updated | ✓ | Changed | |
connection.created | — | ✓ | Added | |
connection.deleted | — | ✓ | Added | |
connection.updated | — | ✓ | Added | |
controller.alarm.comloss.off | endpoint.alarm.comloss.off | ✓ | Changed | |
controller.alarm.comloss.on | endpoint.alarm.comloss.on | ✓ | Changed | |
controller.discovered | endpoint.discovered | ✓ | Changed | |
controller.input.bh.state | endpoint.input.bh.state | ✓ | Changed | |
controller.input.lp.off | endpoint.input.lp.off | ✓ | Changed | |
controller.input.lp.on | endpoint.input.lp.on | ✓ | Changed | |
controller.input.pb.connected | endpoint.input.pb.connected | ✓ | Changed | |
controller.input.pb.disconnected | endpoint.input.pb.disconnected | ✓ | Changed | |
controller.input.pb.status | endpoint.input.pb.status | ✓ | Changed | |
controller.input.pi.off | endpoint.input.pi.off | ✓ | Changed | |
controller.input.pi.on | endpoint.input.pi.on | ✓ | Changed | |
controller.input.pi.status | endpoint.input.pi.status | ✓ | Changed | |
controller.input.po.absent | endpoint.input.po.absent | ✓ | Changed | |
controller.input.po.present | endpoint.input.po.present | ✓ | Changed | |
controller.input.pp.status | endpoint.input.pp.status | ✓ | Changed | |
controller.signal | endpoint.signal | ✓ | Changed | |
credential.created | — | ✓ | New | |
credential.deleted | — | ✓ | New | |
credential.updated | — | ✓ | New | |
device.alarm.forced | door.alarm.forced | ✓ | ✓ | Changed |
device.alarm.forced.cleared | door.alarm.forced.cleared | ✓ | ✓ | Changed |
device.alarm.propped.alloff | door.alarm.propped.alloff | ✓ | Changed | |
device.alarm.propped.off | door.alarm.propped.off | ✓ | ✓ | Changed |
device.alarm.propped.on | door.alarm.propped.on | ✓ | ✓ | Changed |
device.autoopen.off | door.autoopen.off | ✓ | Changed | |
device.autoopen.on | door.autoopen.on | ✓ | Changed | |
device.autoopen.override.off | door.autoopen.override.off | ✓ | Changed | |
device.autoopen.override.on | door.autoopen.override.on | ✓ | Changed | |
device.created | notification.device.created | ✓ | Changed | |
device.deleted | notification.device.deleted | ✓ | Changed | |
device.forceclose.off | door.forceclose.off | ✓ | ✓ | Changed |
device.forceclose.on | door.forceclose.on | ✓ | ✓ | Changed |
device.forceopen.off | door.forceopen.off | ✓ | Changed | |
device.forceopen.on | door.forceopen.on | ✓ | Changed | |
device.input.dps.closed | door.input.dps.closed | ✓ | ✓ | Changed |
device.input.dps.opened | door.input.dps.opened | ✓ | ✓ | Changed |
device.input.relay.off | door.input.relay.off | ✓ | ✓ | Changed |
device.input.relay.on | door.input.relay.on | ✓ | ✓ | Changed |
device.input.rex.off | door.input.rex.off | ✓ | ✓ | Changed |
device.input.rex.on | door.input.rex.on | ✓ | ✓ | Changed |
device.input.virtualread | door.input.virtualread | ✓ | Changed | |
device.request.allowed | door.request.allowed | ✓ | ✓ | Changed |
device.request.denied | door.request.denied | ✓ | ✓ | Changed |
device.request.duress | door.request.duress | ✓ | Changed | |
device.request.ecard.allowed | — | ✓ | New | |
device.request.ecard.denied | — | ✓ | New | |
device.request.filtered | — | ✓ | New | |
device.request.found | door.request.found | ✓ | Changed | |
device.request.multiallowed | door.request.multiallowed | ✓ | Changed | |
device.request.unknown | door.request.unknown | ✓ | ✓ | Changed |
device.updated | notification.device.updated | ✓ | Changed | |
error.bluetooth | error.packetized.protocol | ✓ | Changed | |
error.card.parse | error.card.parse | ✓ | Unchanged | |
error.server | serverError | ✓ | Changed | |
floorgroup.activated | floorgroup.activated | ✓ | Unchanged | |
floorgroup.created | — | ✓ | Added | |
floorgroup.deleted | — | ✓ | Added | |
floorgroup.updated | — | ✓ | Added | |
group.created | — | ✓ | Added | |
group.deleted | — | ✓ | Added | |
group.updated | — | ✓ | Added | |
holder.created | notification.person.created | ✓ | Changed | |
holder.deleted | notification.person.deleted | ✓ | Changed | |
holder.updated | notification.person.updated | ✓ | Changed | |
log.entry | liveEvent | ✓ | Changed | |
organization.created | ou.created | ✓ | Changed | |
organization.deleted | ou.deleted | ✓ | Changed | |
organization.updated | ou.updated | ✓ | Changed | |
partition.created | — | ✓ | Added | |
partition.deleted | — | ✓ | Added | |
partition.updated | — | ✓ | Added | |
permission.accepted | permission.accepted | ✓ | Unchanged | |
permission.created | permission.created | ✓ | Unchanged | |
permission.deleted | permission.deleted | ✓ | Unchanged | |
permission.updated | permission.updated | ✓ | Unchanged | |
rule.antipassback.violation | — | ✓ | New | |
rule.created | — | ✓ | Added | |
rule.deleted | — | ✓ | Added | |
rule.updated | — | ✓ | Added | |
— | command.result.succeed | ✓ | Removed | |
— | endpoint.added | ✓ | Removed | |
— | endpoint.deleted | ✓ | Removed | |
— | entity.added | ✓ | Removed | |
— | entity.modified | ✓ | Removed | |
— | entity.removed | ✓ | Removed | |
— | notification.client.command | ✓ | Removed |