Devices
Introduction
Devices represent doors and gates (along with their accompanying readers), Aperio wireless locks, turnstiles, alarms, elevator buttons, and any other devices that can be controlled with relays. Devices are typically configured manually in pdk.io, but they can also be configured through the API.
The device object
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a",
"name": "Test Device",
"connection": {
"id": "767a1e35-bd34-4858-9130-a0a1900438ed",
"name": "Test Connection",
"type": "usb"
},
"port": 1,
"partition": [
{
"id": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"name": "Default",
"default": true
}
],
"type": "primaryReader",
"publicIcon": "swingingDoor",
"inputTypes": ["wiegand", "unencryptedOsdp", "encryptedOsdp"],
"osdpAddress": 0,
"readerType": "red",
"readerSerialNumber": "032500000001773C",
"supportBleCredentials": true,
"securedReadsOnly": false,
"delay": 0,
"dwell": 30,
"dps": false,
"propAlarm": false,
"propDelay": 0,
"rex": false,
"forcedAlarm": false,
"autoOpenAfterFirstAllow": false,
"hardwareVersion": "red1cn.d",
"serialNumber": "8003323",
"firmwareVersion": "1.1.46",
"created": "2023-09-27 23:28:33"
}
Property | Type | Description |
---|---|---|
id | String | The device ID. |
name | String | The device name. |
connection | Object | The connection associated with this device. |
port | Integer | The port number. |
partition | Object[] | An array of partitions that include this device. |
type | String | The device type. Possible values include primaryReader , additionalReader , ioDevice , premiumIoDevice , elevatorReader , additionalElevatorReader , and floorRelay . |
publicIcon | String | The device icon. Possible values include swingingDoor , swingingGate , rollUpDoor , alarm , light , fan , panicButton , sprinkler , and other . |
primaryReader | Object | The device associated with the primary reader. This only applies if type is set to additionalReader . |
inputTypes | String[] | An array of allowed input types. Possible values include wiegand , unencryptedOsdp , and encryptedOsdp . |
osdpAddress | Integer | The OSDP address. This only applies if inputTypes includes unencryptedOsdp or encryptedOsdp . Possible values include 0 , 1 , 2 , and 3 . |
wirelessAddress | String | The wireless address of the device. This only applies if the connection type is set to wirelessCoordinator . |
readerType | String | The reader type. Possible values include standard , touch , and red . |
readerSerialNumber | String | The reader serial number. |
supportBleCredentials | Boolean | Whether the device supports Bluetooth credentials. |
securedReadsOnly | Boolean | Whether the device only supports high-security credentials. |
delay | Integer | The amount of time (in tenths of a second) the relay will delay before actuating. |
dwell | Integer | The amount of time (in tenths of a second) the relay will remain actuated. |
dps | Boolean | Whether the door position sensor (DPS) is enabled. This only applies if a DPS is installed. |
propAlarm | Boolean | Whether the prop alarm is enabled, which triggers an alarm if a device is left open. This only applies if dps is set to true . |
propDelay | Integer | The amount of time (in seconds) a device must be left open before a prop alarm is triggered. This only applies if propAlarm is set to true . |
rex | Boolean | Whether the request to exit (REX) sensor is enabled. This only applies if a REX sensor is installed. |
forcedAlarm | Boolean | Whether the forced alarm is enabled, which triggers an alarm if a device is forced opened. This only applies if dps is set to true . |
autoOpenAfterFirstAllow | Boolean | Whether auto open will be enabled after the first successful access event. |
authenticationPolicy | String | The authentication policy for this device. Possible values include null , cardOnly , pinOnly , cardOrPin , and cardAndPin (for two-factor authentication). Note that card refers to all types of credentials (not just cards). If a policy is set for both a rule and its corresponding device, the more restrictive policy will be enforced. |
hardwareVersion | String | The controller hardware version. |
serialNumber | String | The controller serial number. |
firmwareVersion | String | The controller firmware version. |
created | String | The device creation timestamp. |
Basic Endpoints
Create a device
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"name": "Test Device",
"type": "primaryReader",
"publicIcon": "swingingDoor",
"connection": "767a1e35-bd34-4858-9130-a0a1900438ed",
"port": 1
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The device name. This must be unique within a system. The maximum length is 70 characters. |
type | Body | String | Yes | The device type. Possible values include primaryReader , additionalReader , ioDevice , premiumIoDevice , elevatorReader , additionalElevatorReader , and floorRelay . |
publicIcon | Body | String | Yes | The device icon. Possible values include swingingDoor , swingingGate , rollUpDoor , alarm , light , fan , panicButton , sprinkler , and other . |
connection | Body | String | Yes | The connection ID. |
port | Body | Integer | Yes | The port number. This port must not be occupied by another device. |
primaryReader | Body | Integer | No | The primary reader ID. This only applies if type is set to additionalReader . |
inputTypes | Body | String[] | No | An array of allowed input types. Possible values include wiegand , unencryptedOsdp , and encryptedOsdp . All types are allowed by default. |
osdpAddress | Body | Integer | No | The OSDP address. This only applies if inputTypes includes unencryptedOsdp or encryptedOsdp . Possible values include 0 , 1 , 2 , and 3 . |
wirelessAddress | Body | String | No | The wireless address of the device. This only applies if the connection type is set to wirelessCoordinator . |
readerType | Body | String | No | The reader type. Possible values include standard , touch , and red . The default is standard . |
readerSerialNumber | Body | String | No | The reader serial number. |
supportBleCredentials | Body | Boolean | No | Whether the device should support Bluetooth credentials. |
securedReadsOnly | Body | Boolean | No | Whether the device should only support high-security credentials. |
delay | Body | Integer | No | The amount of time (in tenths of a second) the relay should delay before actuating. The minimum value is 0 (default) and the maximum value is 9999. |
dwell | Body | Integer | No | The amount of time (in tenths of a second) the relay should remain actuated. The minimum value is 1 and the maximum value is 9999. The default value is 30 (3 seconds). |
dps | Body | Boolean | No | Whether the door position sensor (DPS) should be enabled. This only applies if a DPS is installed. The default value is false . |
propAlarm | Body | Boolean | No | Whether the prop alarm should be enabled, which triggers an alarm if a device is left open. This only applies if dps is set to true . The default value is false . |
propDelay | Body | Integer | No | The amount of time (in seconds) a device must be left open before a prop alarm is triggered. This only applies if propAlarm is set to true . The minimum value is 0 (default) and the maximum value is 9999. |
rex | Body | Boolean | No | Whether the request to exit (REX) sensor should be enabled. This only applies if a REX sensor is installed. The default value is false . |
forcedAlarm | Body | Boolean | No | Whether the forced alarm should be enabled, which triggers an alarm if a device is forced opened. This only applies if dps is set to true . The default value is false . |
autoOpenAfterFirstAllow | Body | Boolean | No | Whether auto open should be enabled after the first successful access event. The default value is false . |
authenticationPolicy | Body | String | No | The authentication policy for this device. Possible values include null (default), cardOnly , pinOnly , cardOrPin , and cardAndPin (for two-factor authentication). Note that card refers to all types of credentials (not just cards). If a policy is set for both a rule and its corresponding device, the more restrictive policy will be enforced. |
Response
The response contains the ID of the newly created device object.
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a"
}
Retrieve a device
Request
GET https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | Integer | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains a device object.
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a",
"name": "Test Device",
"connection": {
"id": "767a1e35-bd34-4858-9130-a0a1900438ed",
"name": "Test Connection",
"type": "usb"
},
"port": 1,
"partition": [
{
"id": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"name": "Default",
"default": true
}
],
"type": "primaryReader",
"publicIcon": "swingingDoor",
"inputTypes": ["wiegand", "unencryptedOsdp", "encryptedOsdp"],
"osdpAddress": 0,
"readerType": "red",
"readerSerialNumber": "032500000001773C",
"supportBleCredentials": true,
"securedReadsOnly": false,
"delay": 0,
"dwell": 30,
"dps": false,
"propAlarm": false,
"propDelay": 0,
"rex": false,
"forcedAlarm": false,
"autoOpenAfterFirstAllow": false,
"hardwareVersion": "red1cn.d",
"serialNumber": "8003323",
"firmwareVersion": "1.1.46",
"created": "2023-09-27 23:28:33"
}
Update a device
Request
PUT https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"name": "Test Device",
"type": "primaryReader",
"publicIcon": "swingingDoor",
"connection": "767a1e35-bd34-4858-9130-a0a1900438ed",
"port": 1,
"delay": 0,
"dwell": 3,
"dps": false,
"rex": false,
"autoOpenAfterFirstAllow": false,
"authenticationPolicy": "cardOrPin"
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The device name. This must be unique within a system. The maximum length is 70 characters. |
type | Body | String | Yes | The device type. Possible values include primaryReader (default), additionalReader , ioDevice , premiumIoDevice , elevatorReader , additionalElevatorReader , and floorRelay . |
publicIcon | Body | String | Yes | The device icon. Possible values include swingingDoor (default), swingingGate , rollUpDoor , alarm , light , fan , panicButton , sprinkler , and other . |
connection | Body | String | Yes | The connection ID. |
port | Body | Integer | Yes | The port number. This port must not be occupied by another device. |
primaryReader | Body | Integer | No | The primary reader ID. This only applies if type is set to additionalReader . |
inputTypes | Body | String[] | No | An array of allowed input types. Possible values include wiegand , unencryptedOsdp , and encryptedOsdp . All types are allowed by default. |
osdpAddress | Body | Integer | No | The OSDP address. This only applies if inputTypes includes unencryptedOsdp or encryptedOsdp . Possible values include 0 , 1 , 2 , and 3 . |
wirelessAddress | Body | String | No | The wireless address of the device. This only applies if the connection type is set to wirelessCoordinator . |
readerType | Body | String | No | The reader type. Possible values include standard , touch , and red . The default is standard . |
readerSerialNumber | Body | String | No | The reader serial number. |
supportBleCredentials | Body | Boolean | No | Whether the device should support Bluetooth credentials. |
securedReadsOnly | Body | Boolean | No | Whether the device should only support high-security credentials. |
delay | Body | Integer | Yes | The amount of time (in tenths of a second) the relay should delay before actuating. The minimum value is 0 (default) and the maximum value is 9999. |
dwell | Body | Integer | Yes | The amount of time (in tenths of a second) the relay should remain actuated. The minimum value is 1 and the maximum value is 9999. The default value is 30 (3 seconds). |
dps | Body | Boolean | Yes | Whether the door position sensor (DPS) should be enabled. This only applies if a DPS is installed. The default value is false . |
propAlarm | Body | Boolean | No | Whether the prop alarm should be enabled, which triggers an alarm if a device is left open. This only applies if dps is set to true . The default value is false . |
propDelay | Body | Integer | No | The amount of time (in seconds) a device must be left open before a prop alarm is triggered. This only applies if propAlarm is set to true . The minimum value is 0 (default) and the maximum value is 9999. |
rex | Body | Boolean | Yes | Whether the request to exit (REX) sensor should be enabled. This only applies if a REX sensor is installed. The default value is false . |
forcedAlarm | Body | Boolean | No | Whether the forced alarm should be enabled, which triggers an alarm if a device is forced opened. This only applies if dps is set to true . The default value is false . |
autoOpenAfterFirstAllow | Body | Boolean | Yes | Whether auto open should be enabled after the first successful access event. The default value is false . |
authenticationPolicy | Body | String | Yes | The authentication policy for this device. Possible values include null (default), cardOnly , pinOnly , cardOrPin , and cardAndPin (for two-factor authentication). Note that card refers to all types of credentials (not just cards). If a policy is set for both a rule and its corresponding device, the more restrictive policy will be enforced. |
Response
HTTP/1.1 204 No Content
Delete a device
Request
DELETE https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 204 No Content
List all devices on a system
Request
GET https://systems.pdk.io/{{system_id}}/devices HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
include | Query | String | No | A comma-delimited list of additional properties to include in the response. Available properties include cloudNode and connection . |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of device objects.
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a",
"name": "Test Device",
"connection": {
"id": "767a1e35-bd34-4858-9130-a0a1900438ed",
"name": "Test Connection",
"type": "usb"
},
"port": 1,
"partition": [
{
"id": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"name": "Default",
"default": true
}
],
"type": "primaryReader",
"publicIcon": "swingingDoor",
"inputTypes": ["wiegand", "unencryptedOsdp", "encryptedOsdp"],
"osdpAddress": 0,
"readerType": "red",
"readerSerialNumber": "032500000001773C",
"supportBleCredentials": true,
"securedReadsOnly": false,
"delay": 0,
"dwell": 30,
"dps": false,
"propAlarm": false,
"propDelay": 0,
"rex": false,
"forcedAlarm": false,
"autoOpenAfterFirstAllow": false,
"hardwareVersion": "red1cn.d",
"serialNumber": "8003323",
"firmwareVersion": "1.1.46",
"created": "2023-09-27 23:28:33"
}
]
List all devices on a cloud node
Request
GET https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
include | Query | String | No | A comma-delimited list of additional properties to include in the response. Available properties include connection and partition . |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of device objects.
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a",
"name": "Test Device",
"connection": {
"id": "767a1e35-bd34-4858-9130-a0a1900438ed",
"name": "Test Connection",
"type": "usb"
},
"port": 1,
"partition": [
{
"id": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"name": "Default",
"default": true
}
],
"type": "primaryReader",
"publicIcon": "swingingDoor",
"inputTypes": ["wiegand", "unencryptedOsdp", "encryptedOsdp"],
"osdpAddress": 0,
"readerType": "red",
"readerSerialNumber": "032500000001773C",
"supportBleCredentials": true,
"securedReadsOnly": false,
"delay": 0,
"dwell": 30,
"dps": false,
"propAlarm": false,
"propDelay": 0,
"rex": false,
"forcedAlarm": false,
"autoOpenAfterFirstAllow": false,
"hardwareVersion": "red1cn.d",
"serialNumber": "8003323",
"firmwareVersion": "1.1.46",
"created": "2023-09-27 23:28:33"
}
]
List all devices on a partition
Request
GET https://systems.pdk.io/{{system_id}}/partitions/{{partition_id}}/devices HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
partition_id | Path | String | Yes | The partition ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of device objects.
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a",
"name": "Test Device",
"connection": {
"id": "767a1e35-bd34-4858-9130-a0a1900438ed",
"name": "Test Connection",
"type": "usb"
},
"port": 1,
"partition": [
{
"id": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"name": "Default",
"default": true
}
],
"type": "primaryReader",
"publicIcon": "swingingDoor",
"inputTypes": ["wiegand", "unencryptedOsdp", "encryptedOsdp"],
"osdpAddress": 0,
"readerType": "red",
"readerSerialNumber": "032500000001773C",
"supportBleCredentials": true,
"securedReadsOnly": false,
"delay": 0,
"dwell": 30,
"dps": false,
"propAlarm": false,
"propDelay": 0,
"rex": false,
"forcedAlarm": false,
"autoOpenAfterFirstAllow": false,
"hardwareVersion": "red1cn.d",
"serialNumber": "8003323",
"firmwareVersion": "1.1.46",
"created": "2023-09-27 23:28:33"
}
]
List all device states
Request
GET https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/states HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
page | Query | Integer | No | The zero-based page number used for pagination. The default value is 0. |
per_page | Query | Integer | No | The number of items per page used for pagination. The default value is 10 and the maximum value is 100. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains an array of device states.
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "35347d04-a99c-4a58-ab32-1317b832507a",
"name": "Test Device",
"dps": false,
"rex": false,
"connection": "767a1e35-bd34-4858-9130-a0a1900438ed",
"wirelessAddress": "",
"port": 1,
"type": "primaryReader",
"publicIcon": "swingingDoor",
"rexOn": false,
"dpsOpen": false,
"forcedAlarmOn": false,
"forceOpen": false,
"forceClose": false,
"forceCloseExpiration": null,
"relayOpen": false,
"autoOpen": false,
"autoOpenOverride": false,
"propAlarmOn": false,
"communicationLost": false,
"controllerIssues": false,
"circuitBreaker": {},
"channelLock": null
}
]
Commands
Open and close a device as a holder
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/virtual-read HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"holderId": "8b37106e-fb08-4700-b14d-70a3967b5086"
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
holderId | Body | String | Yes | The holder ID. |
Response
HTTP/1.1 204 No Content
Open and close a device
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/try-open HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_token | Header | String | Yes | A valid system token. |
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
dwell | Body | Integer | No | The amount of time (in tenths of a second) the device will remain open before closing. This value will override the dwell time configured in pdk.io. The minimum value is 1 and the maximum value is 5400. |
Response
HTTP/1.1 204 No Content
Open a device
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/open HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 204 No Content
Open a device after a delay
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/delay-open HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"delay": 30
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
delay | Body | Integer | Yes | The amount of delay (in tenths of a second) before the device opens. The minimum value is 0 and the maximum value is 9999. |
Response
HTTP/1.1 204 No Content
Close a device
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/close HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 204 No Content
Close a device after a delay
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/delay-close HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"delay": 30
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
delay | Body | Integer | Yes | The amount of delay (in tenths of a second) before the device closes. The minimum value is 0 and the maximum value is 9999. |
Response
HTTP/1.1 204 No Content
Toggle a device's state
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/force-toggle HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 204 No Content
Set a device's do not disturb state
Request
POST https://systems.pdk.io/{{system_id}}/cloud-nodes/{{cloud_node_id}}/devices/{{device_id}}/dnd HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"state": "on"
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
cloud_node_id | Path | String | Yes | The cloud node ID. |
device_id | Path | String | Yes | The device ID. |
system_token | Header | String | Yes | A valid system token. |
state | Body | String | Yes | The DND state. Possible values include on and off . |
Response
HTTP/1.1 204 No Content