# Run DQL Queries via Dynatrace API

**URL:** <https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972>\
**Category:** DQL\
**Tags:** dql, logs\
**Created:** [August 1, 2023, 4:22pm UTC](https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972 "2023-08-01T16:22:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAR1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@JAR1](https://community.dynatrace.com/u/JAR1)\
**Post date:** [August 1, 2023, 4:22pm UTC](https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972/1 "2023-08-01T16:22:26Z")

</div>

_Summary:&nbsp;You can access documentation for running DQL queries via the Dynatrace API at [Grail service | Dynatrace Developer](https://developer.dynatrace.com/platform-services/services/storage/). The API is also available in the Swagger UI, which lets you test and experiment before writing scripts. To open Swagger, navigate to:_  
_`https://<tenantID>.apps.dynatrace.com/platform/swagger-ui/index.html`._

Hi all.

I have a simple question.  
&nbsp;Can I execute a DQL over the Dynatrace API? If so, what is the method I have to use? Is there any example or document?

I would like to querying business events and some logs

Thanks advanced

JAR

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [August 1, 2023, 10:41pm UTC](https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972/2 "2023-08-01T22:41:53Z")

</div>

Hey JAR,

Docs for DQL queries over the API can be found here [Grail service | Dynatrace Developer](http://developer.dynatrace.com/platform-services/services/storage/). You can also find the API in the swagger UI so that you can play around with it and test it before writing scripts that use it. That can be gotten to by going to [tenantID.apps.dynatrace.com/platform/swagger-ui/index.html](http://tenantID.apps.dynatrace.com/platform/swagger-ui/index.html)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![JAR1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@JAR1](https://community.dynatrace.com/u/JAR1)\
**Post date:** [August 2, 2023, 6:26am UTC](https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972/3 "2023-08-02T06:26:08Z")

</div>

Thankyou very much!!
