Pagination for https://host:port/api/v1/computers-inventory? not working properly

user-LYIiPPudND
New Contributor

Hello,

For some reason pagination for above call is not working as expected.
Issue: receiving 500 error for random pages.
For example. I have 200 records, then I am doing 10 page size when I am on page 14 no issues, when I am on 15 page receiving 500 error, then I am on 16 page everything working as expected. Can someone help?

03f72988a9344604aa5f2d5ab487c192

634fa51ad1c140de8610d23be56011ac

4 REPLIES 4

SamF
Contributor II
Contributor II

There were multiple known issues with this endpoint which resulted in the behavior you described. Both have been resolved in version 10.28.0 of Jamf Pro. There may be some clean up necessary, even beyond 10.28.0, as I believe the fix for one of the issues simply prevented it from occurring in the future. These are the issue numbers: PI-008708 and PI-009249.

If you're on 10.28.0 or later and the issues persist, it's probably best to open a ticket with support. I believe some of the fixes prevented the root cause from occurring in 10.28.0 and later, but it may not have been retroactive for environments which encountered the issue prior to upgrading.

mdur
New Contributor

I am experiencing the same issue. I am calling the Jamf Pro computers-inventory endpoint. The results say I have 1005 results, which I cycle through each page while my results are less than the total amount. Randomly, at page 9, having only collected 900 results, I receive 500 errors, but if I start on page 9, it works fine and cycles through to page 18 which I am not sure should exist. I am on version 10.42.1. Has this bug been re-introduced at some stage?

SamF
Contributor II
Contributor II

I'm not aware of any new issues related to this endpoint, however I have experienced issues where a single bad computer record can cause an entire page to fail to load. If I were to speculate, there's likely a device on page 9 that is unable to be queried for some reason (possibly in the GUI as well). I'd open a ticket with Jamf Support, but if you want to try some additional troubleshooting, try narrowing the page size and see if you can identify the specific device that might be causing issues on that page.

This should likely be considered a product issue, as I don't believe a single bad record should cause the entire page to fail to load, but you'd need to work with Support to further investigate and get a ticket filed, if that's what's going on in your environment.

mdur
New Contributor

Thanks for the message. I have only just got the time to test it out and it seems that is exactly what is happening. I ran the same script at a page-size of 1 to identify the resource causing the issue. I re-ran it to skip that particular resource and didn't experience any issues at all. Going to raise a support ticket now to see why this is occurring.