26 Jun 2023 12:04 PM
Hi, I am trying to use the Dynatrace API to import data into PowerBI and some metrics have a limited number of results per page and using the nextPageKey to get the next pages of the API request.
My question is, how can we automate the generation of these keys? I have seen a few posts suggest using Postman scripts but that does not seem to work for me. Any idea on how I can do this? I am flexible with any tool whether it be PowerBI itself or Postman, just want to be able to this properly.
Thanks!
Solved! Go to Solution.
26 Jun 2023 12:48 PM
If you will select less interval (time frame) and the data will be less than page limit - you don't need to worry about next page key.
E.g. -1w has 5 pages
-1d has 1 page
make 7 requests in the loop to get all data...
or yes - use script to iterate page keys
29 Jun 2023 10:36 AM - edited 29 Jun 2023 10:38 AM
Our team is looking to work with data that covers an entire month therefore our pages are generally quite a lot. I have tried to use a Postman script but after the first time of it working now it does not read the nextPageKey as a variable and passes an error.
The error is a TypeError: Cannot read properties of undefined (reading 'nextPageKey')
29 Jun 2023 10:57 AM
Hi,
from my experience the best way is to extract the data that you need first using a script and then ingest it to PowerBI.
Below you have a method that can be used to get all the problems in your environment: