Area Occupancy¶
The Get Area Occupancy API returns an area's occupancy status: occupied or unoccupied state from Enlighted area sensors. An area is a grouping of sensors with an Area ID. The request will return a single data point for all sensors in the area. If you need to see the IDs of all areas, you can query those by using the Get All Areas request.
The sensors in the area will start reporting occupancy data after they are activated as zonal sensors. Refer to the article Enable Zonal Sensors to enable them as zonal sensors to get occupancy data.
For the sensors to report occupancy data, you will need the Sensor and API licenses based on the number of sensors configured in the system. Refer to the License Types and Product Codes.
Request¶
GET https://{em_ip_address_or_hostname}/ems/api/org/area/v1/occ/{area_id}
Parameters¶
Request¶
Name | Description | Data Type | Format Example |
---|---|---|---|
em_ip_address_or_hostname | Manage’s IP address or hostname | string | hostname |
area_id | Area Identifier. Use the Get All Areas API. Alternatively, in Manage, select Facility > Floor > Area in the left panel, and click the Settings tab to get the Area ID. | integer | 12 |
Response¶
Name | Description | Data Type | Format Example |
---|---|---|---|
occupancyState | 0 - Area1 – Area occupied-1 – Sensors are not reporting occupancy-2 – Zone sensor license is not available. Sensors monitoring the occupancy status of the zone are disabled-3 – Unknown area | integer | 1 |
Sample Request¶
Let's assume that the floor has two areas: A Hardware area with ID ‘9’ and a Software area with ID ‘27’. To determine the area occupancy in the Hardware area, specify Area ID ‘9’ in the API command. The occupancy state '0' indicates that the area is unoccupied.
GET https://192.80.3.2/ems/api/org/area/v1/occ/9
Sample Response¶
{
"occupancyStatus":
{
"occupancyState": "0"
}
}