Is there API which can return traceIds by sessionId?

Hi,

I have the following use case:

An open problem which affects some services and every service has a lot of actions. Instead of open them one by one to search for the logs I need a way to get the traceids so I can see all of the logs connected to the problem at ones. I wanted to write some script to do that, but I couldn’t find APIs which I can use.

Thanks!

Regards, Deni

First question: what version of Dynatrace are you using?

The case is on: Dynatrace Managed: 1.316.34.20250608-040133

But I also wondering if this is possible also on SAAS (for example Dynatrace demo env: https://{environmentid}.apps.dynatrace.com/ui/apps/dynatrace.launcher/getting-started)
)

Thanks!

In the case of the SaaS version, you can easily create a dashboard linked to specific trace IDs. You should refer to this documentation: Distributed Tracing — Dynatrace Docs 😊 In the case of the Managed the answer is probably here: https://community.dynatrace.com/t5/Dynatrace-API/Collecting-all-sub-traces-for-a-Trace-ID-via-API/m-p/209869