# How do you manage nextPageKey automatically when extracting lots of data from Dynatrace?

**URL:** <https://community.dynatrace.com/t/how-do-you-manage-nextpagekey-automatically-when-extracting-lots-of-data-from-dynatrace/33653>\
**Category:** Dynatrace API\
**Tags:** managed-cluster, dynatrace-api\
**Created:** [December 29, 2021, 9:43am UTC](https://community.dynatrace.com/t/how-do-you-manage-nextpagekey-automatically-when-extracting-lots-of-data-from-dynatrace/33653 "2021-12-29T09:43:27Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [January 12, 2022, 5:07am UTC](https://community.dynatrace.com/t/how-do-you-manage-nextpagekey-automatically-when-extracting-lots-of-data-from-dynatrace/33653/7 "2022-01-12T05:07:35Z")

</div>

I have the same problem and have yet to find a simple solution as well.&nbsp; Mike\_L’s link is honestly extremely helpful but I’d rather not rely on it since it doesn’t support all API’s and it’s not logic i can apply elsewhere.&nbsp; I’ve tried similar approaches using postman and insomnia REST Clients but they handle nextpages in a way different than DT approaches it.

I’ve coded solutions in Python and PHP but they’re clunky and honestly my code is embarassing to get it working.

I’m posting in response because the “Next Page” thing is actually a cause sometimes for me to just not want to use the API.&nbsp; I know I’ll only get a partial result set and it’s too time consuming to put all the JSON responses together. This is even an issue with PowerBI and Excel reporting because they too can’t handle the API’s NextPage thing.

Is DT considering any solutions for this?&nbsp; Being that DT is all API First it would be helpful to the clients if the APIs can be a bit more client friendly.&nbsp; (don’t get me start on inconsistent FROM string defaults)

---

_[View the full topic](https://community.dynatrace.com/t/how-do-you-manage-nextpagekey-automatically-when-extracting-lots-of-data-from-dynatrace/33653)._
