# Get all key request

**URL:** <https://community.dynatrace.com/t/get-all-key-request/40441>\
**Category:** Open Q&A\
**Tags:** key-requests, dynatrace-api\
**Created:** [June 28, 2023, 8:55pm UTC](https://community.dynatrace.com/t/get-all-key-request/40441 "2023-06-28T20:55:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GustavoPires](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GustavoPires](https://community.dynatrace.com/u/GustavoPires)\
**Post date:** [June 28, 2023, 8:55pm UTC](https://community.dynatrace.com/t/get-all-key-request/40441/1 "2023-06-28T20:55:07Z")

</div>

Hi people,

I’m looking for a way to get all the key requests i have setted on my environment.

At the moment i have been using two different ways to get it:

1º Using Data explorer;

2º Using multidimensional analysis;

But both ways are based on the timeframe so it’s not accurate as I need.

Hopefully the community can give me some ideas to find a way to get all the key request i have on my environment not depending by timeframe.

More like to show a vision about the limit of licenses i still have free.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [June 29, 2023, 4:42am UTC](https://community.dynatrace.com/t/get-all-key-request/40441/2 "2023-06-29T04:42:57Z")

</div>

Hello&nbsp;[@GustavoPires](https://community.dynatrace.com/user/52477)

Try the following:

> **[Monitored entities API - GET entities list](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-entities-list)**
>
> View a list of monitored entities via Dynatrace API.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![Kenny\_Gillette](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kenny_gillette/32/20170_2.png) [@Kenny\_Gillette](https://community.dynatrace.com/u/Kenny_Gillette)\
**Post date:** [June 29, 2023, 11:20am UTC](https://community.dynatrace.com/t/get-all-key-request/40441/3 "2023-06-29T11:20:36Z")

</div>

see previous post and I gave a dashboard you can use to get key requests.&nbsp; I know still has timeframe but but I could do after talking with Dynatrace team.

[https://community.dynatrace.com/t5/Open-Q-A/How-to-view-all-key-requests/m-p/214386](https://community.dynatrace.com/post/214386)

Also another post on limits in another post:&nbsp;[https://community.dynatrace.com/t5/Product-ideas/Dynatrace-Imposed-Limit-Tracker/idi-p/214621](https://community.dynatrace.com/post/214621)

---

<div class="post-metadata">

**Author:** ![vasile\_gafton](https://avatars.discourse-cdn.com/v4/letter/v/51bf81/32.png) [@vasile\_gafton](https://community.dynatrace.com/u/vasile_gafton)\
**Post date:** [June 29, 2023, 11:50am UTC](https://community.dynatrace.com/t/get-all-key-request/40441/4 "2023-06-29T11:50:04Z")

</div>

Hi,

below you can find a short snippet of a method in Python that you can use to get all key requests:

def getKeyRequests():&nbsp; &nbsp; url = ROOT\_URL + “/api/v2/entities”&nbsp; &nbsp; parameters = {&nbsp; &nbsp; &nbsp; &nbsp; ‘entitySelector’: ‘type(SERVICE\_METHOD),fromRelationships.isServiceMethodOfService(type(SERVICE))’,&nbsp; &nbsp; &nbsp; &nbsp; ‘from’: ‘now-10M’&nbsp; &nbsp; }&nbsp; &nbsp; res = requests.get(url, headers=HEADER, verify=False, params=parameters)&nbsp; &nbsp; json\_data = json.loads(res.text)&nbsp; &nbsp; return json\_data[“entities”]

---

<div class="post-metadata">

**Author:** ![GustavoPires](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GustavoPires](https://community.dynatrace.com/u/GustavoPires)\
**Post date:** [June 29, 2023, 4:38pm UTC](https://community.dynatrace.com/t/get-all-key-request/40441/5 "2023-06-29T16:38:16Z")

</div>

Hi vasile,

Thanks for your helping!

---

<div class="post-metadata">

**Author:** ![GustavoPires](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GustavoPires](https://community.dynatrace.com/u/GustavoPires)\
**Post date:** [June 29, 2023, 4:42pm UTC](https://community.dynatrace.com/t/get-all-key-request/40441/6 "2023-06-29T16:42:52Z")

</div>

Hi Kenny,

Thanks for your helping!

---

<div class="post-metadata">

**Author:** ![GustavoPires](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GustavoPires](https://community.dynatrace.com/u/GustavoPires)\
**Post date:** [June 29, 2023, 4:45pm UTC](https://community.dynatrace.com/t/get-all-key-request/40441/7 "2023-06-29T16:45:27Z")

</div>

Hi Babar,

Thanks for your helping!
