Hi everyone,
I need to extract all data from a provider through their Webhook API, but I'm facing an issue with pagination. The API returns a paginated response, meaning it only fetches 100 records per page. To retrieve assets from a specific page, I need to specify the page number in the API endpoint, like so:
https://XXXXXX.com/assets.api?page=3
This will fetch the assets from the third page. The total number of pages (19 in this case) is included in the API response.
How can I create a loop to increment the page
parameter in the URL and fetch data from all pages, until I have all records?
Any help or guidance would be greatly appreciated!
Thanks in advance!