I am using a GET request to get a list of vendors. The problem with the API is that it only gives me 20 vendors at a time, I have 150 vendors. The request gives me a next page value, that I can use in another request to get the next page of vendors. If I make a bunch of requests I can eventually see all my vendors. Is there a way I can combine all the results of the requests and put it all in one table? Or do I need to make a table that has pages? I don't know how to do either.
Believe you can use Pagination settings in a table:
- When you click the table > Inspector > Add-ons (screenshot), you'll see Pagination.
- You can check the
Enable server-side pagination settings
and it will show more settings where you can set up the pagination type.
- For your use case, I believe Cursor based will be the best? Not sure, you might need to explore different ways depending on the type of API you are using.
- For Cursor based though, you would just need to put the value for the next page in
Next cursor
like{{ nameOfCodeBlock.data.nextToken }}
. Then in the API code block have the value for the next token be{{ table1.pagination.afterCursor }}
. If you set theRun behavior
of the API code block to automatic, I believe it should update as you change the pages on the table.
Not very complete advise but hope that at least gives you some direction!
1 Like