This API returns the desk occupancy for all desk sensors on a floor.
You will need the IoT sensor license and Real-time Desk Occupancy API License (API-RTO-DSK) to get real-time desk occupancy for a floor. Read Request License to purchase licenses if you have not, and assign 'Desk Sensor' Fixture Type to sensors before using this API call. Refer to the article Enable Desk Sensors that describes how 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 |
|
em_ip_address or hostname |
Manage’s IP address or hostname |
floor_id |
Floor identifier. Use the Floor ID returned in the Get All Floors API, or in Manage, select Facility > Floor in the left panel, and click the Settings tab to see the Floor ID. |
Response |
|
id |
The fixture or sensor identifier. |
name |
Sensor name. |
occupancyState |
0 – Desk Unoccupied 1 – Desk Occupied -1 – Fault. Sensors are not reporting occupancy |
Sample Code
For example, if Floor 1 has three desk sensors, send a request to return the Desk occupancy for all desk sensors on the floor. The occupancy status for all desk sensors on Floor 1 is returned.
Get https://192.80.3.1/ems/api/org/sensor/v1/getDeskOccupancyState/list/floor/1 |
Comments
Article is closed for comments.