How to Retrieve Mobile App Crash Stack Traces via API in Dynatrace?

We are using Dynatrace Classic Mobile Crash Analysis and can retrieve crash metadata using USQL APIs. How can we retrieve the full app crash stack trace programmatically?

Is there a supported API for stack traces, or are stack traces only available through the Crash Analysis UI/internal endpoints such as ‘/rest/dtaql/executequery’?

We also need to export all crash records for a specific time range without the 1000-record UI limitation.

If you are on SaaS win New RUM experience enabled, you can query it using DQL:

fetch user.events
| filter characteristics.classifier == "error"
| filter characteristics.has_crash == true

For Classic RUM (or if you are in Managed, which has only Classic RUM), there is no API. The session data can be accessed only by USQL API, there is no API access to the raw data which is used to display the screens in UI

How can I retrieve mobile application crash logs from Dynatrace using the Grail API?

  • Can mobile crash events and stack traces be accessed through the Grail API?
  • What are the prerequisites for accessing the Grail API?
  • How do I generate the required API token?
  • Which token scopes/permissions are required to query mobile crash data?
  • Are there any specific IAM policies, roles, or access permissions that need to be configured?
  • Could you provide the relevant documentation and example API requests for retrieving crash events and stack traces?

@tushar_supe I’d recommend using dtctl ( GitHub - Dynatrace/dtctl: CLI for managing Dynatrace platform resources - built for humans and AI agents · GitHub ) if you want it programmatically:

dtctl auth login --context playground --environment https://playground.apps.dynatrace.com
dtctl query "fetch user.events | filter characteristics.classifier == \"error\"| filter characteristics.has_crash == true" -o yaml

You can also use MCP server of course, especially in an AI workfow. Also see official skills GitHub - Dynatrace/dynatrace-for-ai: Skills, prompts, and instructions for building AI agents on top of Dynatrace production context · GitHub if you want to go with this path. Those skills already include mobile frontend analysis skills.

And last but not least, if you really need API access directly,

IAM permissions required are storage:buckets:read and storage:user.events:read, see https://docs.dynatrace.com/docs/shortlink/iam-policystatements
For permission setup, I recommend reaching out to your Dynatrace admin.

In dtctl, you can actually explore and call ANY Dynatrace API via dtctl get apis, dtctl describe api, dtctl exec api.

See dtctl/docs/resources/api-discovery.md at main · Dynatrace/dtctl · GitHub