# Export topology relationship

**URL:** <https://community.dynatrace.com/t/export-topology-relationship/48953>\
**Category:** Dynatrace API\
**Tags:** smartscape, topology, dynatrace-api\
**Created:** [November 19, 2024, 1:29pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953 "2024-11-19T13:29:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![roberto\_ravo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/roberto_ravo/32/2129_2.png) [@roberto\_ravo](https://community.dynatrace.com/u/roberto_ravo)\
**Post date:** [November 19, 2024, 1:29pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953/1 "2024-11-19T13:29:54Z")

</div>

Hi all!

We would like to try to extract all entities from a given application. We have identified the possibility of using the /api/v2/entities API and extracting entities by type using the relationship part and then manipulate it inside a script. In your opinion is this a correct method? Does anyone have something ready to share?

Regards  
Roberto

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 19, 2024, 1:34pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953/2 "2024-11-19T13:34:11Z")

</div>

Hello&nbsp;[@roberto\_ravo](https://community.dynatrace.com/user/19581)

Regarding the raised concern kindly proceed with the attached URL:

- [https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/basics/deprecation-migration-guides/topology-v1-to-entity-v2](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/basics/deprecation-migration-guides/topology-v1-to-entity-v2)

KR,

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 19, 2024, 1:36pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953/3 "2024-11-19T13:36:52Z")

</div>

Hi&nbsp;[@roberto\_ravo](https://community.dynatrace.com/user/19581)

You can also refer to the attached URL in case you’re interested in DQL:

- [https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/dt-entities](https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/dt-entities)

BR,

Peter

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [November 19, 2024, 1:42pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953/4 "2024-11-19T13:42:41Z")

</div>

Hello&nbsp;[@roberto\_ravo](https://community.dynatrace.com/user/19581)

For future cases, As per Dynatrace

- Deprecated:

> **[Topology and Smartscape API](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/topology-and-smartscape)**
>
> Learn about the Dynatrace Topology and Smartscape API.

Active:

- [https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/entity-v2](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/entity-v2)

Regards,

Peter.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [November 19, 2024, 1:43pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953/5 "2024-11-19T13:43:15Z")

</div>

That’s exactly how we are doing it, target your app then add in the query to list the to/from relationships as needed. The only downside is you get the Dynatrace ID and not the friendly name - I suspect this can be overcome with Grail as a lookup could be leveraged.

---

<div class="post-metadata">

**Author:** ![roberto\_ravo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/roberto_ravo/32/2129_2.png) [@roberto\_ravo](https://community.dynatrace.com/u/roberto_ravo)\
**Post date:** [November 19, 2024, 4:11pm UTC](https://community.dynatrace.com/t/export-topology-relationship/48953/6 "2024-11-19T16:11:52Z")

</div>

Thank you all for the quick response!  
So basically, you are confirming what I though about this topic.  
Also DQL I think that coul be a great solution, but I think that the query will be a little bit tricky.  
In your opinion, is there a script or query available somewhere that would allow us to extract what is necessary?

Thank you!  
Roberto
