Real-time Desk Occupancy for a Floor¶
This API detects and returns if a desk is occupied or unoccupied with area information from Enlighted desk sensors.
For the sensors to report occupancy data, you will need licenses based on the number of sensors. Purchase both the Sensor and API licenses to get real-time desk occupancy for all desks on a floor. Refer to the License Types and Product Codes.
Also, before using this API call, ensure all desk sensors are assigned to the 'Desk Sensor' Fixture Type. See the article Enable Desk Sensors to assign 'Desk Sensor' Fixture Type to sensors.
Request¶
GET https://{em_ip_address_or_hostname}/ems/api/org/sensor/v1/getDeskOccupancyState/list/floor/{floor_id}
Parameters¶
Request¶
Name | Description | Data Type | Format Example |
---|---|---|---|
em_ip_address_or_hostname | The Manage’s IP address or hostname. | string | 192.80.3.2 |
floor_id | Floor identifier. Use the Get All Floors API, or in EM, select Facility > Floor > in the left panel, and click the Settings tab to obtain the Floor ID. | integer | 2 |
Response¶
Name | Description | Data Type | Format Example |
---|---|---|---|
id | The fixture or sensor identifier. | integer | 72 |
name | Floor identifier. Use the Get All Floors API, or in EM, select Facility > Floor > in the left panel, and click the Settings tab to obtain the Floor ID. | string | Sensor71af2a |
occupancyState | 0 – Desk Unoccupied1 – Desk Occupied-1 – Fault. Sensors are not reporting occupancy. | integer | 1 |
Sample Request¶
For example, if Floor 1 has three desk sensors, the occupancy status for all three desk sensors on Floor 1 is returned.
GET https://192.80.3.1/ems/api/org/sensor/v1/getDeskOccupancyState/list/floor/1
Sample Response¶
{
"deskSensor": [
{
"id": "70",
"name": "Sensor71bd6a",
"occupancyState": "0"
},
{
"id": "71",
"name": "Sensor71af2a",
"occupancyState": "0"
},
{
"id": "72",
"name": "Sensor71b13e",
"occupancyState": "1"
}
]
}