Hi Mateusz!
The History API call should return the counts aggregated per minute for the zone ID for Corridor that you would have had defined in the call.
This averageCount should map to the occupancy of the zone over that time period (raw detections of objects per frame over the 60 second interval) and entrances should map to only crossings in to the defined zone for that time period also.
For "Zones", the Analytics tab references that "a person is counted when crossing a defined line or remaining in a zone", the combining of which may be why you see the discrepancy between the two formats.
However, we are in the process of deprecating the "Zones" functionality and transitioning to "Areas", which has additional functionality for line crossings counted as "In" and "Out" dependent on direction of travel over the threshold, as well as specific area occupancy and crossing parameters such as entered, exited, appeared, and expired.
Whilst the API does have support for historical data and even live data polling with a short delay, we could suggest using MQTT messages for the purpose of data aggregation. As it is streamed continuously to the broker, it removes the possibility of any timestamp overlap in sequential API requests.
Please let me know if you have any additional questions on this!
If you found this post helpful, please give it kudos. If my answer solved your problem, click "accept as solution" so that others can benefit from it.