Sep 22, 2021 4:42 AM - edited Sep 23, 2021 11:18 AM
Hopefully someone can give me a nudge in the right direction, I'm building a portal where users can create a 'Project' (custom object) record and associate it with other objects. I have this all functional except one issue and that is being able to get more than 100 results in an api call.
I know the Searhc API allows up to 10,000 using the pagination feature but I'm looking to see if anyone has any guidence on a good method to loop through all the results using PHP.
Below is an example of an api call for me searching for all 'Projects' that have an id. This returns the first 100 perfectly. I'm then adding the projects into a 'Table'.
Looking for some help on how i'd be able to loop through calling the api until I have all the projects?
Sep 23, 2021 4:37 AM - edited Sep 23, 2021 11:17 AM
This might not be the cleanest way, but I think I managed to get the outcome I am after by building this function. It loops through and recalls the api if there is an 'after' value in the result of the previous api call.
It then adds a '<td>' to a table to show all projects.