Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

API Pagination from Dynatrace

Hello.

I need to paginate the information from Dynatrace API.

 

The way the API pagination works is:

 

1- The origin is WEB and the API format is:

url:

https://xxxxxxxx.live.dynatrace.com/api/v2/problems

Headers:

pageSize=500 (size of page, in this case 500 which is the maximum)

from=now-1M (period)

Authentication:

api-token=xxxxxxxx

 

The curl is: 

https://xxxxxxxx.live.dynatrace.com/api/v2/problems?pageSize=500&from=now-1M&api-token=xxxxxxxx

 

Esteban__2-1706891351424.png

 

2- The result is:

Esteban__1-1706890530938.png

where:

totalcount = Total of events

pagesize = Total of events which are imported in this query

nextpagekey = Is the key that will be necessary to perform pagination

problems = List that cointains the important information

warnings = Will not be used

 

3- Now pagination must now be done:

For pagination is necessary to change the API headers.

 

NEW API:

url:

https://xxxxxxxx.live.dynatrace.com/api/v2/problems

Headers:

nextPageKey = key obtained previously

Authentication:

api-token=xxxxxxxx

 

The curl is: 

https://xxxxxxxx.live.dynatrace.com/api/v2/problems?nextPageKey=xxxxxxxx&api-token=xxxxxxxx

 

Esteban__3-1706892351713.png

 

4- The result is:

Esteban__4-1706892406538.png

this query brought the last 39 events.

 

In this case there is not nextpagekey in the results, that means this is the last page, so this is the end.

 

The problem i have is that i need to automate this process, but I have not been able to create a script that performs this pagination automatically, which generates a single variable that contains all the "problems" information of all the pages.

 

I'll appreciate if you can help me to build this in power query.

 

Regards

 

3 REPLIES 3
lbendlin
Super User
Super User

Anonymous
Not applicable

Hi, thanks for your answer.

I reviewed the documentation, but it is still somewhat confusing, since I previously tried to use this function without success.

What have you tried and where are you stuck?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors