# Obtain "Endpoint Name" in a v1 extension?

**URL:** <https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068>\
**Category:** Extensions\
**Tags:** extensions\
**Created:** [October 12, 2023, 6:09pm UTC](https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068 "2023-10-12T18:09:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 12, 2023, 6:09pm UTC](https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068/1 "2023-10-12T18:09:29Z")

</div>

In extensions v1, how can I get the “Endpoint name” of the running thread? Is there a self.config[“”] entry available for it, or is it available programmatically in some form?

---

<div class="post-metadata">

**Author:** ![DavidMass](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/davidmass/32/9065_2.png) [@DavidMass](https://community.dynatrace.com/u/DavidMass)\
**Post date:** [October 12, 2023, 6:14pm UTC](https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068/2 "2023-10-12T18:14:35Z")

</div>

Hi&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213),&nbsp;  
I believe you should be able to find both the endpoint name and id via self.activation :

```python
self.activation.endpoint_name
self.activation.entity_id

```

I would suggest to use the id as that should always be available.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 12, 2023, 6:40pm UTC](https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068/3 "2023-10-12T18:40:02Z")

</div>

[@DavidMass](https://community.dynatrace.com/user/909),

Thanks for the quick reply! I’ll check them out.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 15, 2023, 3:54pm UTC](https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068/4 "2023-10-15T15:54:42Z")

</div>

[@DavidMass](https://community.dynatrace.com/user/909),

Worked perfectly. Does self.activation have more entries, as there seems to be no documentation about it?

---

<div class="post-metadata">

**Author:** ![DavidMass](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/davidmass/32/9065_2.png) [@DavidMass](https://community.dynatrace.com/u/DavidMass)\
**Post date:** [October 16, 2023, 1:30pm UTC](https://community.dynatrace.com/t/obtain-endpoint-name-in-a-v1-extension/42068/5 "2023-10-16T13:30:14Z")

</div>

Hi&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213),&nbsp;  
Glad to hear it!

Printing it or calling get\_activation\_context() you get this below (at least from the oneagent\_sim). I’ll see if I can find out any more information for you.

```python
print(self.activation) : RemoteActivationContext(config_id=0x7b, endpoint=Test configuration, properties={'instance_cfg': 'simulator'}, enabled=True)

print(self.get_activation_context()) : RemoteActivationContext(config_id=0x7b, endpoint=Test configuration, properties={'instance_cfg': 'simulator'}, enabled=True)

```
