The ONTAP REST API provides pagination if that helps. If you go to the Swagger doc (https://{clusterip}/docs/api - check out the "Records & Pagination" section at the top under "Features for all ONTAP APIs". Basically you would check for a "_links.next.href" link to get the next set of records.