# Dynatrace Environment API - Export List of problems

**URL:** <https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, problems, dynatrace-api\
**Created:** [August 30, 2026, 8:24am UTC](https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833 "2026-08-30T08:24:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khejazi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/khejazi/32/9921_2.png) [@Khejazi](https://community.dynatrace.com/u/Khejazi)\
**Post date:** [August 30, 2026, 8:24am UTC](https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833/1 "2026-08-30T08:24:22Z")

</div>

Hi All,

I wanted to export list of problems within a period of time to an excel sheet.

What i did is the following:

- Generate new Token with problem Read

- In Dynatrace Environment API : I went to Problems =\> Get, then i clicked on the lock key to authenticate using the new tokens generated

- I clicked on “Try it out”

- I filled the details as below

1- fields =\>&nbsp;Problem,impacted,Affected,Root Cause,Start Date,Duration,Alerting profiles

2-&nbsp;nextPageKey=\> Null

3-&nbsp;pageSize=\> 50

4-&nbsp;from=\>&nbsp;2026-07-01

5- to=\>&nbsp;2026-07-31

6-&nbsp;problemSelector=\>&nbsp;status(“any”)

7-entitySelector=\>&nbsp;type(“any”)

8-sort=\> null

Then i clicked on Execute, but it did not work

I got the below responses:

Snippets=\>&nbsp;curl -X ‘GET’ \ '\*\*\*\*\ -H ‘accept: application/json; charset=utf-8’ \ -H ‘Authorization: Api-Token \*\*\*\*\*\*\*\*\*’

#### Request URL=\>&nbsp;[some URL](https://dynatrace.srca.org.sa/e/348dde0d-242e-4f52-9b52-e0223515ad1e/api/v2/problems?fields=Problem%2Cimpacted%2CAffected%2CRoot%20Cause%2CStart%20Date%2CDuration%2CAlerting%20profiles&pageSize=50&from=2026-07-01&to=2026-07-31&problemSelector=status%28%22any%22%29&entitySelector=type%28%22any%22%29)

| Code | Details |
| 401_Undocumented_ | Error: Unauthorized
##### Response body
Download

```
{ "error": { "code": 401, "message": "Token Authentication failed"
  }
```

 |

Can you guide me where is the problem and how to solve it please

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [August 30, 2026, 9:01am UTC](https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833/2 "2026-08-30T09:01:53Z")

</div>

[@Khejazi](https://community.dynatrace.com/user/100771)&nbsp;token scope is incorrect or you are calling a different environment.

---

<div class="post-metadata">

**Author:** ![Khejazi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/khejazi/32/9921_2.png) [@Khejazi](https://community.dynatrace.com/u/Khejazi)\
**Post date:** [August 30, 2026, 9:14am UTC](https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833/3 "2026-08-30T09:14:00Z")

</div>

so can you guide me what to do please

What is the correct token to be used

Which one of these?

 ![Khejazi_0-1788081905674.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/5/05c47a933353f1f0f75dc47c7e0b066fec1f3543.png)

---

<div class="post-metadata">

**Author:** ![Khejazi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/khejazi/32/9921_2.png) [@Khejazi](https://community.dynatrace.com/u/Khejazi)\
**Post date:** [August 30, 2026, 9:20am UTC](https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833/4 "2026-08-30T09:20:02Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;also what about the parameters values? are they OK?

---

<div class="post-metadata">

**Author:** ![Khejazi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/khejazi/32/9921_2.png) [@Khejazi](https://community.dynatrace.com/u/Khejazi)\
**Post date:** [August 30, 2026, 10:35am UTC](https://community.dynatrace.com/t/dynatrace-environment-api-export-list-of-problems/56833/5 "2026-08-30T10:35:00Z")

</div>

[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;,

Thanks for the support, I just recreated another token with read problem and it works fine.
