# Error using API using dtcli.py

**URL:** <https://community.dynatrace.com/t/error-using-api-using-dtcli-py/14470>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [August 6, 2018, 9:35pm UTC](https://community.dynatrace.com/t/error-using-api-using-dtcli-py/14470 "2018-08-06T21:35:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aboddeti](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@aboddeti](https://community.dynatrace.com/u/aboddeti)\
**Post date:** [August 6, 2018, 9:35pm UTC](https://community.dynatrace.com/t/error-using-api-using-dtcli-py/14470/1 "2018-08-06T21:35:06Z")

</div>

While using dtcli.py ([https://github.com/Dynatrace/dynatrace-cli](https://github.com/Dynatrace/dynatrace-cli)) for querying metrics using DT API getting the following error.

\> py dtcli.py dqlr host .\* host.cpu.system[max%hour]  
C:\Anaconda3\lib\site-packages\urllib3\connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.  
See: [https://urllib3.readthedocs.io/en/latest/advanced…](https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings)  
InsecureRequestWarning)  
{‘Error’: “Dynatrace API returned an error: The tag ‘’ is unknown”}

Appreciate if anyone can help with this issue

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [August 7, 2018, 4:42am UTC](https://community.dynatrace.com/t/error-using-api-using-dtcli-py/14470/2 "2018-08-07T04:42:47Z")

</div>

Did you use a tag filter with a tag that is not know to the Dynatrace environment?

---

<div class="post-metadata">

**Author:** ![aboddeti](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@aboddeti](https://community.dynatrace.com/u/aboddeti)\
**Post date:** [August 7, 2018, 2:01pm UTC](https://community.dynatrace.com/t/error-using-api-using-dtcli-py/14470/3 "2018-08-07T14:01:19Z")

</div>

I suspected the same while using the tag but as you can see in the above command

“py [dtcli.py](http://dtcli.py/) dqlr host .\* host.cpu.system[max%hour]” I did not have any tag but still I am getting the same error.

Let me know if you need any further details.

---

<div class="post-metadata">

**Author:** ![andreas\_grabner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andreas_grabner/32/27879_2.png) [@andreas\_grabner](https://community.dynatrace.com/u/andreas_grabner)\
**Post date:** [August 7, 2018, 2:10pm UTC](https://community.dynatrace.com/t/error-using-api-using-dtcli-py/14470/4 "2018-08-07T14:10:30Z")

</div>

Hi. I am the owner of this GitHub project and happy to help. As I like to test this myself against your tenant I suggest we exchange some of these details via email. Please send me an email and we discuss the next steps: [firstname.lastname@dynatrace.com](mailto:firstname.lastname@dynatrace.com)
