Skip to main content
Question

classicApi pagination

  • September 9, 2024
  • 1 reply
  • 7 views

Forum|alt.badge.img+3

I am trying to fetch all policies through an API call to endpoint `/JSSResource/policies`
But I am getting only 25 policies, without any header of `next` `page` or something like this.
How can I query for all policies and not just random 25 of them?

Thanks in advance

1 reply

Tangentism
Forum|alt.badge.img+10
  • Honored Contributor
  • September 9, 2024

If you're receiving it back in XML, you should have a total in the first part of the dataset:

 

<?xml version="1.0" encoding="UTF-8"?>
  <policies>
    <size>284</size>

If the result is in JSON then it doesn't show that but will say the amount of data in the response headers. For example:

content-length: 15440 

Can you check the response from the API web interface and ensure that all expected results are returned? [https://your-url.jamfcloud.com/classicapi/doc/ ]