Floor Groups
Introduction
Floor groups are used to define elevator rules, which allow users to access authorized floors by presenting their credentials to a corresponding elevator reader.
The floor group object
{
"id": "a963712f-fda9-4e47-885f-f750e5419f30",
"name": "Test Floor Group",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"readerPort": {
"id": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"name": "Test Device",
"cloudNode": {
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"serialNumber": "1234ABC",
"name": "Test Cloud Node"
}
},
"floors": [
{
"id": "11e21062-30fc-40f3-8309-7103c91d6c45",
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": "99105ab2-0ae2-46ee-a410-3a201c75fa74",
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": "19f664f2-b30a-4898-b4ce-207b05cd19b6",
"name": "Floor 3",
"type": "floorRelay"
}
]
}
Property | Type | Description |
---|---|---|
id | String | The floor group ID. |
name | String | The floor group name. |
partition | String | The partition ID. |
readerPort | Object | A partial elevator reader device object. Users present their credentials to this reader to activate all authorized floor buttons. |
floors | Object[] | An array of partial floor relay device objects. |
Basic Endpoints
Create a floor group
Request
POST https://systems.pdk.io/{{system_id}}/floor_groups HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"name": "Test Floor Group",
"readerPort": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"floors": [
"11e21062-30fc-40f3-8309-7103c91d6c45",
"99105ab2-0ae2-46ee-a410-3a201c75fa74",
"19f664f2-b30a-4898-b4ce-207b05cd19b6"
]
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The floor group name. This must be unique within a system. The maximum length is 70 characters. |
partition | Body | String | No | The partition ID. The user's default partition will be used if not specified. |
readerPort | Body | String | Yes | The elevator reader device ID. This device should have a type of elevatorReader or additionalElevatorReader . Users present their credentials to this reader to activate all authorized floor buttons. |
floors | Body | String[] | 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": "a963712f-fda9-4e47-885f-f750e5419f30"
}
Retrieve a floor group
Request
GET https://systems.pdk.io/{{system_id}}/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
floor_group_id | Path | String | Yes | The floor group ID. |
system_token | Header | String | Yes | A valid system token. |
Response
The response contains a floor group object.
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "a963712f-fda9-4e47-885f-f750e5419f30",
"name": "Test Floor Group",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"readerPort": {
"id": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"name": "Test Device",
"cloudNode": {
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"serialNumber": "1234ABC",
"name": "Test Cloud Node"
}
},
"floors": [
{
"id": "11e21062-30fc-40f3-8309-7103c91d6c45",
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": "99105ab2-0ae2-46ee-a410-3a201c75fa74",
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": "19f664f2-b30a-4898-b4ce-207b05cd19b6",
"name": "Floor 3",
"type": "floorRelay"
}
]
}
Update a floor group
Request
PUT https://systems.pdk.io/{{system_id}}/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Content-Type: application/json
{
"name": "Test Floor Group",
"readerPort": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"floors": [
"11e21062-30fc-40f3-8309-7103c91d6c45",
"99105ab2-0ae2-46ee-a410-3a201c75fa74",
"19f664f2-b30a-4898-b4ce-207b05cd19b6"
]
}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
floor_group_id | Path | String | Yes | The floor group ID. |
system_token | Header | String | Yes | A valid system token. |
name | Body | String | Yes | The floor group name. This must be unique within a system. The maximum length is 70 characters. |
partition | Body | String | No | The partition ID. The user's default partition will be used if not specified. |
readerPort | Body | String | 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 | String[] | 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://systems.pdk.io/{{system_id}}/floor_groups/{{floor_group_id}} HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system ID. |
floor_group_id | Path | String | Yes | The floor group ID. |
system_token | Header | String | Yes | A valid system token. |
Response
HTTP/1.1 204 No Content
List all floor groups
GET https://systems.pdk.io/{{system_id}}/floor_groups HTTP/1.1
Authorization: Bearer {{system_token}}
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
system_id | Path | String | Yes | The system 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 floor group objects.
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "a963712f-fda9-4e47-885f-f750e5419f30",
"name": "Test Floor Group",
"partition": "619cceb0-ac58-4b15-a8ec-32efcb0476ba",
"readerPort": {
"id": "dece5258-c3a9-4990-ae99-77c71cc6c0d3",
"name": "Test Device",
"cloudNode": {
"id": "7d829ff4-53e8-4d76-8762-1022ccdeae39",
"serialNumber": "1234ABC",
"name": "Test Cloud Node"
}
},
"floors": [
{
"id": "11e21062-30fc-40f3-8309-7103c91d6c45",
"name": "Floor 1",
"type": "floorRelay"
},
{
"id": "99105ab2-0ae2-46ee-a410-3a201c75fa74",
"name": "Floor 2",
"type": "floorRelay"
},
{
"id": "19f664f2-b30a-4898-b4ce-207b05cd19b6",
"name": "Floor 3",
"type": "floorRelay"
}
]
}
]