API to monitor or retrieve concurrent session count

New to Teamviewer use of API

Wanted to know where or how I could write service to monitor the number of concurrent licenses that are in use.   Looking to develop some analytics and forecasting of concurrent license needs by day/hour etc.