Get Area Occupancy for a Floor

The Get Area Occupancy for a Floor returns the current occupancy status of all areas on a floor. The occupancy status is provided only when the area sensors are enabled as zone sensors to report occupancy data.

You will need the IoT sensor license and additional Real-time Area Occupancy (API-RTO-AREA) license to get occupancy for a floor or area. Read Request License to purchase licenses as needed.


GET https://{em_ip_address_or_hostname}/ems/api/org/facility/v1/getOccupancyStateOfFloorAreas/



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 obtain the Floor ID.
Id Area identifier
name Area name as described in Manage
description Area description as described in Manage. The field will be empty if there is no description entered in Manage.

The area has been activated as a zone sensor area. The area starts reporting consolidated occupancy status. Note that the zone sensor license must be purchased and available for the sensors to report occupancy information. Otherwise, occupancy data is not reported by the sensors.

true – Sensors in the area are enabled as zone sensors.
false – Sensors in the area are disabled as zone sensors.


0 – Area unoccupied
1 – Area occupied
-1 – Fault. Sensors are not reporting occupancy.

Note: For this API, you will always get an additional area. Its ID field will ALWAYS be "0". Its name will always be "Unassigned". The value of occupancyState will be "1" if ANY sensor on that floor is NOT in an area, but its current state is "occupied". If all such sensors are "vacant", then this value will be "0".  

Sample Code

Send a request to return the occupancy state for all areas on Floor 1. For example, Floor 1 in the Main building has two areas: Hardware and Software. The details of the areas and their corresponding Area IDs and occupancy state for all areas on Floor 1 are returned.

Get https://{}/ems/api/org/facility/v1/getOccupancyStateOfFloorAreas/1

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/JSON
Content-Length: 7582
Date: Sat, 21 Jul 2015 17:06:51 GMT
  "id": "9",  ** Area ID**
  "name": "Hardware",
  "description": "hw eng",
  "zonesensorenable": "true"
  “occupancyState”: “1”,
  "id": "27", **Area ID**
  "name": "Software",
  "description": "sw eng",
  "zonesensorenable": "false",
  “occupancyState”: “1”,

"id": "0", **Area ID**
  "name": "Unassigned",
  "description": "Unassigned area",
  “occupancyState”: “1”,

Recommended articles:

Was this article helpful?
1 out of 2 found this helpful
Have more questions? Submit a request


Article is closed for comments.