# API error after 10k assets

**URL:** <https://discuss.rapid7.com/t/api-error-after-10k-assets/18380>\
**Category:** API\
**Tags:** InsightVM\
**Created:** [January 2, 2023, 1:32pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380 "2023-01-02T13:32:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ager](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@ager](https://discuss.rapid7.com/u/ager)\
**Post date:** [January 2, 2023, 1:32pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/1 "2023-01-02T13:32:26Z")

</div>

The experimental API fails after fetching 10k (after 20 pages) assets with this error -

- com.rapid7.spring.rest.error.resource.ErrorResource
- An unexpected error occurred. Please contact Rapid7 support.

endpoint is “https://{region}.api.insight.rapid7.com/vm/experimental/assets”

---

<div class="post-metadata">

**Author:** ![ilyaaz\_noerkhan](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/i/85e7bf/32.png) [@ilyaaz\_noerkhan](https://discuss.rapid7.com/u/ilyaaz_noerkhan)\
**Post date:** [January 2, 2023, 4:09pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/2 "2023-01-02T16:09:32Z")

</div>

Don’t know your use case. But keep in mind that the experimental API will be removed on January 20th.  
Do you experience the same with InsightVM Cloud Integration API?

---

<div class="post-metadata">

**Author:** ![LPO](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/l/b782af/32.png) [@LPO](https://discuss.rapid7.com/u/LPO)\
**Post date:** [January 3, 2023, 6:35pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/3 "2023-01-03T18:35:33Z")

</div>

Is that the “graphql” api ?

---

<div class="post-metadata">

**Author:** ![ager](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@ager](https://discuss.rapid7.com/u/ager)\
**Post date:** [January 9, 2023, 4:32pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/4 "2023-01-09T16:32:17Z")

</div>

I tried to fetch the v4 endpoint: https://{region}.api.insight.rapid7.com/vm/v4/integration/assets  
after 20 pages of 500 (10k total assets) I get the same error:

- com.rapid7.spring.rest.error.resource.ErrorResource
- An unexpected error occurred. Please contact Rapid7 support.

---

<div class="post-metadata">

**Author:** ![jason\_mull](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@jason\_mull](https://discuss.rapid7.com/u/jason_mull)\
**Post date:** [January 9, 2023, 5:02pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/5 "2023-01-09T17:02:47Z")

</div>

I’ve run into a similar error previously, and looping by using page numbers appears to have a hardcoded size limitation. Using the “cursor” parameter to define the starting point for additional pages in the API is likely the better way to go. My use case has been to call the API with something like 500 records, and then rather than looping by page numbers, loop by the cursor value to get the next page. This link has a bit more info on using the cursor for pagination:

[InsightVM Cloud Integrations API (rapid7.com)](https://help.rapid7.com/insightvm/en-us/api/integrations.html#section/Overview/Formats)

---

<div class="post-metadata">

**Author:** ![ss153152](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@ss153152](https://discuss.rapid7.com/u/ss153152)\
**Post date:** [January 11, 2023, 6:40pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/6 "2023-01-11T18:40:57Z")

</div>

im able to get over 20,000 assets back using the cursor value

---

<div class="post-metadata">

**Author:** ![sledbetter](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@sledbetter](https://discuss.rapid7.com/u/sledbetter)\
**Post date:** [January 24, 2023, 12:55am UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/7 "2023-01-24T00:55:28Z")

</div>

I don’t suppose you have a source link regarding the experimental API being removed do you?

---

<div class="post-metadata">

**Author:** ![ilyaaz\_noerkhan](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/i/85e7bf/32.png) [@ilyaaz\_noerkhan](https://discuss.rapid7.com/u/ilyaaz_noerkhan)\
**Post date:** [January 26, 2023, 3:08pm UTC](https://discuss.rapid7.com/t/api-error-after-10k-assets/18380/8 "2023-01-26T15:08:14Z")

</div>

No, it was a pop-up window within InsightVM that stated this when navigating in the product. I couldn’t find any other references. But I did make a screenshot of the message.  
 ![image](https://forum-uploads-hub-prod-1-us-east-1-rapid7-com.s3.dualstack.us-east-1.amazonaws.com/original/2X/0/05cd3cc6068e30c6d35e59acc7892e91c070d65b.png)
