Skip to main content
Version: 2.0

Cloud Nodes

Introduction

Cloud nodes acts as gateways to the PDK cloud platform. One or more cloud nodes can be synced with a system, and each cloud node usually represents a distinct geographic location. You can learn more about the PDK topology here. Note that the API sometimes refers to cloud nodes as panels.

The cloud node object

{
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"name": "Test Cloud Node",
"description": null,
"created": "2023-09-27T22:21:56.671Z",
"serialNumber": "1234ABC",
"ecards": [1234567],
"offlinePolicy": 1,
"killTimer": 259200,
"timezone": "US/Pacific",
"locale": "en",
"cardFormat": [
{
"id": "d057fbaa-aa27-4905-a5af-7b610e5cc83f",
"description": "Standard 26-bit Format",
"min_input_bits": 9,
"max_input_bits": 64,
"facility_code": "NOT_ENFORCED"
}
],
"syncStatus": {
"synced": false,
"details": {
"timestamp": "2023-10-31T14:32:51.281Z",
"dataFlowStatus": "Started"
}
},
"connectionStatus": {
"connected": true,
"details": {
"timestamp": "2023-09-27T22:55:12Z"
}
}
}
PropertyTypeDescription
idStringThe cloud node ID.
nameStringThe cloud node name.
descriptionStringThe cloud node description.
createdStringAn ISO 8601 timestamp representing the time at which the cloud node was registered.
serialNumberStringThe cloud node serial number.
ecardsInteger[]An array of emergency card (e-card) numbers.
offlinePolicyIntegerHow the cloud node behaves if it's offline and unable to acquire the current time. 0 means only users with e-cards will be allowed, 1 means only users with 24×7 access will be allowed, and 2 means all users with credentials will be allowed, regardless of the time (i.e. schedules will be ignored).
killTimerIntegerThe amount of time (in seconds) the cloud node is allowed to remain offline before reverting to emergency card (e-card) access only.
timezoneStringThe cloud node time zone in TZ notation.
localeStringAn ISO 639-1 language code representing the preferred language for the cloud node.
cardFormatObject[]An array of allowed card formats.
cardFormat.idStringThe card format ID.
cardFormat.descriptionStringThe card format description.
cardFormat.min_input_bitsIntegerThe minimum number of bits allowed in the data packet transmitted by the reader.
cardFormat.max_input_bitsIntegerThe maximum number of bits allowed in the data packet transmitted by the reader.
cardFormat.facility_codeStringHow facility codes are enforced. ENFORCED means facility codes are enforced on a per-credential basis, FILTER_LIST means only the facility codes specified in the allowed_facility_codes parameter are allowed, and NOT_ENFORCED means facility codes are ignored.
cardFormat.allowed_facility_codesInteger[]An array of allowed facility codes. This only applies if facility_code is set to FILTER_LIST.
cardFormat.enforce_parityBooleanWhether credential scans are denied if their parity doesn't match.
syncStatus.syncedBooleanWhether or not the cloud node is synced with the system.
syncStatus.details.timestampStringAn ISO 8601 timestamp representing the last time the cloud node synced with the system.
syncStatus.details.dataFlowStatusStringA description of the sync status. This only applies if synced is false. Possible values include Pending, Started, BlockedByOfflineNode, and BlockedByFailure.
connectionStatus.connectedBooleanWhether or not the cloud node is connected.
connectionStatus.details.timestampStringAn ISO 8601 timestamp representing the last time the connection status was updated.
info

If a cloud node is offline but no changes have been made to the system since the last sync, then syncStatus.synced will still be true even if connectionStatus.connected is false.

Basic Endpoints

Create a cloud node

Request

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

{
"name": "Test Cloud Node"
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe cloud node name.
descriptionBodyStringNoThe cloud node description.
serialNumberBodyStringNoThe cloud node serial number.
ecardsBodyInteger[]NoAn array of emergency card (e-card) numbers.
offlinePolicyBodyIntegerNoHow the system behaves if it's offline and unable to acquire the current time. 0 (default) means only users with e-cards will be allowed, 1 means only users with 24×7 access will be allowed, and 2 means all users with credentials will be allowed, regardless of the time (i.e. schedules will be ignored).
killTimerBodyIntegerNoThe amount of time (in seconds) the system is allowed to remain offline before reverting to emergency card (e-card) access only. The minimum value is 300 seconds. The default value is 259200 seconds (3 days).
timezoneBodyStringNoThe cloud node time zone in TZ notation. The default value is the time zone of the system.
localeBodyStringNoAn ISO 639-1 language code representing the preferred language for the cloud node. The default value is en.
cardFormatBodyObject[]NoAn array of allowed card formats. The default value includes only the standard 26-bit format.
cardFormat.idBodyStringYesThe card format ID.
cardFormat.descriptionBodyStringNoThe card format description.
cardFormat.min_input_bitsBodyIntegerYesThe minimum number of bits allowed in the data packet transmitted by the reader. The minimum value is 9 and the maximum value is 512.
cardFormat.max_input_bitsBodyIntegerYesThe maximum number of bits allowed in the data packet transmitted by the reader. The minimum value is 9 and the maximum value is 512.
cardFormat.facility_codeBodyStringNoHow facility codes are enforced. ENFORCED (default) means facility codes are enforced on a per-credential basis, FILTER_LIST means only the facility codes specified in the allowed_facility_codes parameter are allowed, and NOT_ENFORCED means facility codes are ignored.
cardFormat.allowed_facility_codesBodyInteger[]SometimesAn array of allowed facility codes. This is required if facility_code is set to FILTER_LIST.
cardFormat.enforce_parityBodyBooleanNoWhether credential scans should be denied if their parity doesn't match. The default value is true.

Response

The response contains the ID of the newly created cloud node object.

HTTP/1.1 201 Created
Content-Type: application/json

{
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39"
}

Retrieve a cloud node

Request

GET https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
cloud_node_idPathStringYesThe cloud node ID.
system_tokenHeaderStringYesA valid system token.

Response

The response contains a cloud node object.

HTTP/1.1 200 OK
Content-Type: application/json

{
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"name": "Test Cloud Node",
"description": null,
"created": "2023-09-27T22:21:56.671Z",
"serialNumber": "1234ABC",
"ecards": [1234567],
"offlinePolicy": 1,
"killTimer": 259200,
"timezone": "US/Pacific",
"locale": "en",
"cardFormat": [
{
"id": "d057fbaa-aa27-4905-a5af-7b610e5cc83f",
"description": "Standard 26-bit Format",
"min_input_bits": 9,
"max_input_bits": 64,
"facility_code": "NOT_ENFORCED"
}
],
"syncStatus": {
"synced": true,
"details": {
"timestamp": "2024-06-14T15:13:47.000Z"
}
},
"connectionStatus": {
"connected": true,
"details": {
"timestamp": "2023-10-31T14:08:03.000Z"
}
}
}

Update a cloud node

Request

PUT https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json

{
"name": "Test Cloud Node"
}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
cloud_node_idPathStringYesThe cloud node ID.
system_tokenHeaderStringYesA valid system token.
nameBodyStringYesThe cloud node name.
descriptionBodyStringNoThe cloud node description.
serialNumberBodyStringNoThe cloud node serial number.
ecardsBodyInteger[]NoAn array of emergency card (e-card) numbers.
offlinePolicyBodyIntegerNoHow the system behaves if it's offline and unable to acquire the current time. 0 (default) means only users with e-cards will be allowed, 1 means only users with 24×7 access will be allowed, and 2 means all users with credentials will be allowed, regardless of the time (i.e. schedules will be ignored).
killTimerBodyIntegerNoThe amount of time (in seconds) the system is allowed to remain offline before reverting to emergency card (e-card) access only. The minimum value is 300 seconds. The default value is 259200 seconds (3 days).
timezoneBodyStringNoThe cloud node time zone in TZ notation. The default value is the time zone of the system.
localeBodyStringNoAn ISO 639-1 language code representing the preferred language for the cloud node. The default value is en.
cardFormatBodyObject[]NoAn array of allowed card formats. The default value includes only the standard 26-bit format.
cardFormat.idBodyStringYesThe card format ID.
cardFormat.descriptionBodyStringNoThe card format description.
cardFormat.min_input_bitsBodyIntegerYesThe minimum number of bits allowed in the data packet transmitted by the reader. The minimum value is 9 and the maximum value is 512.
cardFormat.max_input_bitsBodyIntegerYesThe maximum number of bits allowed in the data packet transmitted by the reader. The minimum value is 9 and the maximum value is 512.
cardFormat.facility_codeBodyStringNoHow facility codes are enforced. ENFORCED (default) means facility codes are enforced on a per-credential basis, FILTER_LIST means only the facility codes specified in the allowed_facility_codes parameter are allowed, and NOT_ENFORCED means facility codes are ignored.
cardFormat.allowed_facility_codesBodyInteger[]SometimesAn array of allowed facility codes. This is required if facility_code is set to FILTER_LIST.
cardFormat.enforce_parityBodyBooleanNoWhether credential scans should be denied if their parity doesn't match. The default value is true.

Response

HTTP/1.1 204 No Content

Delete a cloud node

Request

DELETE https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
cloud_node_idPathStringYesThe cloud node ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 204 No Content

List all cloud nodes

Request

GET https://systems.pdk.io/{{system_id}}/cloud-nodes HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
pageQueryIntegerNoThe zero-based page number used for pagination. The default value is 0.
per_pageQueryIntegerNoThe number of items per page used for pagination. The default value is 10 and the maximum value is 100.
system_tokenHeaderStringYesA valid system token.

Response

The response contains an array of cloud node objects.

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"name": "Test Cloud Node",
"description": null,
"created": "2023-09-27T22:21:56.671Z",
"serialNumber": "1234ABC",
"ecards": [1234567],
"offlinePolicy": 1,
"killTimer": 259200,
"timezone": "US/Pacific",
"locale": "en",
"cardFormat": [
{
"id": "d057fbaa-aa27-4905-a5af-7b610e5cc83f",
"description": "Standard 26-bit Format",
"min_input_bits": 9,
"max_input_bits": 64,
"facility_code": "NOT_ENFORCED"
}
],
"syncStatus": {
"synced": true,
"details": {
"timestamp": "2023-10-31T14:08:03.000Z"
}
},
"connectionStatus": {
"connected": true,
"details": {
"timestamp": "2023-09-27T22:55:12Z"
}
}
}
]

List all cloud node hardware

Request

GET https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/hardware HTTP/1.1
Authorization: Bearer {{system_token}}
ParameterLocationTypeRequiredDescription
system_idPathStringYesThe system ID.
cloud_node_idPathStringYesThe cloud node ID.
system_tokenHeaderStringYesA valid system token.

Response

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"id": "b8f4c2a9-0cdc-40fd-90ac-f1c51a4f524b",
"type": "controller",
"connection": {
"id": "767a1e35-bd34-4858-9130-a0a1900438ed",
"name": "Test Connection",
"type": "usb"
},
"wirelessAddress": "",
"firmwareVersion": "1.1.46",
"hardwareVersion": "red1cn.d",
"serialNumber": "8003323",
"connectionStatus": {
"connected": true,
"details": {
"timestamp": "2023-10-04T00:27:07.000Z"
}
},
"radioTimeout": false,
"overcurrent": false,
"undervoltage": false,
"lowPowerMode": false,
"batteryChargeCategory": "N",
"batteryHealth": "U",
"inputPowerOn": true,
"peripheralPowerOn": true,
"recentComlosses": [],
"unstableConnection": false,
"bootloaderVersion": "1.0.44",
"startupVersion": "0.3.1",
"batteryLevel": 0,
"batteryTime": 0,
"batteryCurrent": 0,
"inputVoltage": 13984,
"inputCurrent": 132,
"peripheralCurrent": 161,
"peripheralVoltage": 12096,
"syncStatus": {
"synced": true,
"details": {
"timestamp": "2023-10-04T15:43:17.000Z"
}
},
"transactions": []
}
]