I’m trying to figure out how to configure pagination when connecting to external data source. I’m working with Prey API and need to pull in all records or iterate through the pages to get all record to show up on one table. Prey max limit is 100 record per page. How would I configure the model so that it iterate the pages and pull all records?
I don’t have a Prey account to test with, but based on their documentation I believe you will want to set the ‘Offset parameter’ field in the model options to ‘page’. You can then explicitly call out the page size in the Data source URL, like
devices?page_size=100
Querying with no limit should then repeatedly send requests with the ‘page’ URL parameter iterating until all records are retrieved. Let me know if you get error messages with this, I can’t test it directly myself but I’m happy to help troubleshoot as necessary!
Thank you for the reply! @benjamin.tevelow
I set it up as you suggested and no success with iterating through the pages. It is able to pull 100 record through the Data source URL. And only seem to pull just records from the 1st page.
I tried inputting the following in the ‘Offset parameter’ field:
page
page=
page=1
page=2
‘page’
@benjamin.tevelow Are there any more suggestions you can add?