# Dynatrace API with more than 500 output

**URL:** <https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, dynatrace-api\
**Created:** [July 12, 2021, 11:57am UTC](https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077 "2021-07-12T11:57:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [July 12, 2021, 11:57am UTC](https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077/1 "2021-07-12T11:57:07Z")

</div>

Hi All

Why the output include only 500 items in the ouput even the Nextpagekey was mentioned.

 ![Malaik_0-1626090859512.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/0/c01cd5368bc5b1dc314873aa88ea6c819a97f58a.png)

Any idea?

Thanks

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 12, 2021, 12:18pm UTC](https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077/2 "2021-07-12T12:18:37Z")

</div>

The page size is 500, that’s why your result set is split into&nbsp; 3395/500 → 7 pages.&nbsp;  
You need to issue 7 calls to Dynatrace API to get the full result.

You may want to try the pageSize parameter to return larger pages, but 5000 is the maximum anyway.

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [July 12, 2021, 12:34pm UTC](https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077/3 "2021-07-12T12:34:27Z")

</div>

But how make 7 calls?

Changing time frame every call or how?

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [July 12, 2021, 1:50pm UTC](https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077/4 "2021-07-12T13:50:14Z")

</div>

No you just copy the nextPageKey value, remove all the other filters and just call the same endpoint giving only the nextPageKey as a cursor. You will then get the next 500 entities and a NEW nextPageKey that you again enter as the cursor.

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [July 12, 2021, 1:58pm UTC](https://community.dynatrace.com/t/dynatrace-api-with-more-than-500-output/32077/5 "2021-07-12T13:58:30Z")

</div>

Thanks a lot&nbsp;[@wolfgang\_beer](https://community.dynatrace.com/user/8624)&nbsp;,

I didn’t pay attention that the NextPageKey changes on every call.

Have a good day.
