Dynatrace API
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace Environment API - Export List of problems

Khejazi
Guide

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 => Problem,impacted,Affected,Root Cause,Start Date,Duration,Alerting profiles

2- nextPageKey=> Null

3- pageSize=> 50

4- from=> 2026-07-01

5- to=> 2026-07-31

6- problemSelector=> status("any")

7-entitySelector=> type("any")

8-sort=> null

 

Then i clicked on Execute, but it did not work

I got the below responses:

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

Request URL=> some URL

CodeDetails
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

 

 

4 REPLIES 4

Julius_Loman
DynaMight Legend
DynaMight Legend

@Khejazi token scope is incorrect or you are calling a different environment.

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

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

 

@Julius_Loman also what about the parameters values? are they OK?

Khejazi
Guide

@Julius_Loman ,

 

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

 

 

Featured Posts