Forum Discussion
tom_malkiewicz
5 years agoHelper I
Need help with iterating through API response pages
Hello, I have been trying to find a solution for the past week now and still struggling. I have an access to an API of our CRM system. The api response comes with total number of records per e...
lbendlin
5 years agoSuper User
The standard approach is:
- fetch (and buffer) the first page.
- get the total record count from that
- either generate a list of the URLS for the second to nth page or run an iterator if you have a next page indicator
- concatenate the first page results with the results from the previous step. This avoids having to re-fetch the first page again.