Floor Groups
Introduction
Floor groups can be used to associate an elevator reader with floor relays, allowing users to activate all authorized floor buttons by presenting their credentials to the reader. These floor groups can then be referenced in rules.
The floor group object
{
"id": 1,
"name": "Test Floor Group",
"partition": 0,
"readerPort": {
"id": 1,
"name": "Test Device"
},
"floors": [
{
"id": 1,
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
}
]
}
Property | Type | Description |
---|---|---|
id | Integer | The floor group ID. |
name | String | The floor group name. |
partition | Integer | The partition ID. |
readerPort | Object | The elevator reader device object. Users present their credentials to this reader in order to activate all authorized floor buttons. |
floors | Object[] | An array of floor relay device objects. |
Basic Endpoints
Create a floor group
Request
POST https://panel-{{panel_id}}.pdk.io/api/floor_groups HTTP/1.1
Authorization: Bearer {{panel_token}}
Content-Type: application/json
{
"name": "Test Floor Group",
"readerPort": 1,
"floors": [1, 2, 3]
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
panel_id | Path | String | Yes | The cloud node serial number. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The floor group name. This must be unique within a cloud node. The maximum length is 70 characters. |
partition | Body | Integer | No | The partition ID. The user's default partition will be used if not specified. |
readerPort | Body | Integer | Yes | The elevator reader device ID. This device should have a type of elevatorReader or additionalElevatorReader . Users present their credentials to this reader in order to activate all authorized floor buttons. |
floors | Body | Integer[] | Yes | An array of floor relay device IDs. The referenced devices should have a type of floorRelay . |
Response
The response contains the ID of the newly created floor group object.
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 1
}
Retrieve a floor group
Request
GET https://panel-{{panel_id}}.pdk.io/api/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{panel_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
panel_id | Path | String | Yes | The cloud node serial number. |
floor_group_id | Path | Integer | Yes | The floor group ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains a floor group object.
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 1,
"name": "Test Floor Group",
"partition": 0,
"readerPort": {
"id": 1,
"name": "Test Device"
},
"floors": [
{
"id": 1,
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
}
]
}
Update a floor group
Request
PUT https://panel-{{panel_id}}.pdk.io/api/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{panel_token}}
Content-Type: application/json
{
"name": "Test Floor Group",
"readerPort": 1,
"floors": [1, 2, 3]
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
panel_id | Path | String | Yes | The cloud node serial number. |
floor_group_id | Path | Integer | Yes | The floor group ID. |
panel_token | Header | String | Yes | A valid panel token. |
name | Body | String | Yes | The floor group name. This must be unique within a cloud node. The maximum length is 70 characters. |
partition | Body | Integer | No | The partition ID. The user's default partition will be used if not specified. |
readerPort | Body | Integer | Yes | The elevator reader device ID. This device should have a type of elevatorReader or additionalElevatorReader . Users present their credentials to this reader in order to activate all authorized floor buttons. |
floors | Body | Integer[] | Yes | An array of floor relay device IDs. The referenced devices should have a type of floorRelay . |
Response
HTTP/1.1 204 No Content
Delete a floor group
Request
DELETE https://panel-{{panel_id}}.pdk.io/api/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{panel_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
panel_id | Path | String | Yes | The cloud node serial number. |
floor_group_id | Path | Integer | Yes | The floor group ID. |
panel_token | Header | String | Yes | A valid panel token. |
Response
HTTP/1.1 204 No Content
List all floor groups
GET https://panel-{{panel_id}}.pdk.io/api/floor_groups HTTP/1.1
Authorization: Bearer {{panel_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
panel_id | Path | String | Yes | The cloud node serial number. |
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. |
panel_token | Header | String | Yes | A valid panel token. |
Response
The response contains an array of floor group objects.
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": 1,
"name": "Test Floor Group 1",
"partition": 0,
"readerPort": {
"id": 1,
"name": "Test Device 1"
},
"floors": [
{
"id": 1,
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
}
]
},
{
"id": 2,
"name": "Test Floor Group 2",
"partition": 0,
"readerPort": {
"id": 2,
"name": "Test Device 2"
},
"floors": [
{
"id": 2,
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": 3,
"name": "Floor 3",
"type": "floorRelay"
},
{
"id": 4,
"name": "Floor 4",
"type": "floorRelay"
}
]
}
]