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

nextPageKey syntax?

Lisa_Singh01
Participant

Sorry new to Dynatrace so perhaps a silly question...
Does anyone have an example of using curl and the Rest API with the "nextPageKey" parameter to fetch more than 1000 results when pulling down metrics?


8 REPLIES 8

nextPageKey you should add via query parameter. So there isn'y any magic here 🙂 just add https://uri?nexyPageKey=value

This value you should read from previous response.

Sebastian


Thank you Sebastian!

I can see that from the API Explorer as well, but still not quite wrapping my head around it. Do I need to add a header parameter that first specifies what the key is (in a similar way to adding the authorisation key) then follow that with nextPageKey=(value I just put in the header)?


No, you don't need. Just add nextPageKey to url as in my example. Nothing more. First request you can execute without this parameter (you will see value for it in response). Than read this value from first response (and all next) and just add it to url.

Sebastian


Sorry I am still being thick I think. What do I put in for "value" in nextPageKey=value - or just use the word value not an actual value?


Value is string that you receive from previous request. You should put there next page indicator returned in response. Treat value as placeholder here 🙂


Thank you! Now back to learning enough scripting to parse that into the next request.

New at all this, many thanks for your help.


If you will have any extra questions, please ask 🙂

Sebastian


MaciejNeumann
Community Team
Community Team

Hello Lisa! There is no such thing as a silly question, as every each of us was new to Dynatrace at some point. If you have any doubts about some topic, don't be shy and ask about it. Our community is very active and I'm sure that someone will help you with it 🙂


If you have any questions about the Forum, you can contact me at maciej.neumann@dynatrace.com