# Export incoming and outgoing connection data to a host through API

**URL:** <https://community.dynatrace.com/t/export-incoming-and-outgoing-connection-data-to-a-host-through-api/40357>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [June 23, 2023, 1:14pm UTC](https://community.dynatrace.com/t/export-incoming-and-outgoing-connection-data-to-a-host-through-api/40357 "2023-06-23T13:14:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amareshanand](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@amareshanand](https://community.dynatrace.com/u/amareshanand)\
**Post date:** [June 23, 2023, 1:14pm UTC](https://community.dynatrace.com/t/export-incoming-and-outgoing-connection-data-to-a-host-through-api/40357/1 "2023-06-23T13:14:50Z")

</div>

Can you please advise, if there is any way to export incoming and outgoing connection data to a host through API.

 ![Connections.jpg](https://global.discourse-cdn.com/dynatrace/original/3X/9/1/91cde4ba94fab8fe2897d322ad903ba88396a215.jpeg)

Thanks & Regards,

Amaresh Anand

---

<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:** [June 23, 2023, 2:03pm UTC](https://community.dynatrace.com/t/export-incoming-and-outgoing-connection-data-to-a-host-through-api/40357/2 "2023-06-23T14:03:02Z")

</div>

This can be done via API with Environment V1 (Even though it says its deprecated)

 ![ChadTurner_0-1687528953571.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/a/8a5e513d0dcb053b2d5f9528df32de3305f6b541.png)

but also via the environment API V2

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [June 24, 2023, 6:00pm UTC](https://community.dynatrace.com/t/export-incoming-and-outgoing-connection-data-to-a-host-through-api/40357/3 "2023-06-24T18:00:34Z")

</div>

Hi&nbsp;[@amareshanand](https://community.dynatrace.com/user/48427)

Check the&nbsp; **fromRelationships** and&nbsp; **toRelationships** within the&nbsp;[Response body objects](https://www.dynatrace.com/support/help/shortlink/api-entities-v2-get-all-entities-list#response-body-objects) of [Monitored entities API - GET entities list](https://www.dynatrace.com/support/help/shortlink/api-entities-v2-get-all-entities-list)&nbsp;for entity type HOST

HTH

Yos
