Avatar

Zone entry/exit times

0

I'd like to use the API to determine when a vehicle has entered and exited a zone. The goal is to determine how long that particular vehicle was in the zone. What would be the best method to use to get this information? 

Thanks, 
Todd

Mauricio Muniz

Please sign in to leave a comment.

1 comment

0
Avatar

Through UI, you can first create an exception rule for zone entering, and create another rule for zone exiting. 

In the next step, since you know the name of the rules, through API, you can find these rules, and query the exception events for these rules, separately. You will find datetime when the rules are broken, which are in fact when the vehicle enters and exits the zone. 

In 5.6, the property of ExceptionEvent datetime is DateTime, while in 5.7, it is ActiveFrom. 

Thanks.

Geotab Developers 0 votes