29 Oct 2025
03:58 PM
- last edited on
30 Oct 2025
07:35 AM
by
MaciejNeumann
Hi,
I am trying to query the Dynatrace logs my company creates, from a command line utility written in either Python or C#.
It seems that the access method - platform vs API token - changed over time, the old examples are no longer working, since I can't add log access to the platform tokens.
Does anyone have a recent code example that works?
Thank you in advance,
Simon
29 Oct 2025 05:27 PM
Hi Simon,
Since the migration to Grail (Log Management & Analytics), log access is done exclusively via API tokens—platform tokens can no longer be used for log queries.
Recommended now: use the Grail Query API endpoint.
Official Doc here : https://developer.dynatrace.com/plan/platform-services/grail-service/#grail-query-api
Best regards,