How to use APIs to track the license usage of various system users?

How to use APIs to track the license usage of various system users?

You can leverage the DQL API: Grail service | Dynatrace Developer

Then using a query like following will give you the DQL query usage.

fetch dt.system.events
| filter event.kind == "BILLING_USAGE_EVENT" and matchesPhrase(event.type, "Query")
| filter isNotNull(user.email)
| fields query_start, event.type, user.email, billed_bytes
| fieldsAdd query_cost = billed_bytes/1024/1024/1024*toDouble(0.0035)