22 Jan 2025
10:08 AM
- last edited on
23 Jan 2025
07:12 AM
by
MaciejNeumann
How to use APIs to track the license usage of various system users?
Solved! Go to Solution.
27 Jan 2025 09:11 AM
You can leverage the DQL API: developer.dynatrace.com/platform-services/services/storage/
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)