The Get Area Occupancy for a Floor returns the occupancy status for all areas on a floor. An area is a grouping of sensors with an Area ID. The API response is a single data point for all sensors in the area.
The sensors in the area will start reporting occupancy data only after they are activated as zonal sensors. Refer to the article Enable Zonal Sensors to enable them as zonal sensors to get occupancy data.
The request will return occupied or unoccupied for all areas on the floor. For example, if Floor 1 in a building has two areas, the API will return occupied or unoccupied for all areas on Floor 1 identified with Area ID. If you ever need to see the IDs of all areas, you can query those by using the Get All Areas request.
For the sensors to report occupancy data, you will need the Sensor and API licenses based on the number of sensors in the system. Refer to the License Types and Product Codes.
|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.|
|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.
0 – Area unoccupied
Note: For this API, the response will always include an additional area with ID field ALWAYS "0" and the name "Unassigned". The occupancyState will be "1 - Area occupied" if ANY sensor on that floor does not belong to an area and is "occupied". If all such sensors are "vacant", then the value will be "0 - Area unoccupied".
Send a request to return the occupancy state for all areas on Floor 1. For example, if 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 is returned in the response.
Article is closed for comments.