Smartsheet rest api pagination
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 07:25 AM
Hi ,
We are integrating smartsheet rest api’s in snaplogic. We get only totalrecordscount in the response. there is no other things comes up in response. I need to apply pagination . In paramters i can use page and pageSize .
Page is something which page we want to access and pageSize is 100 by default. These 2 paramters are not part of the response.
I am not sure how I can create hasNext and nextUrl to paginate and fetch all 77k records.
I am attaching the screenshots of rest snap settings .I am unable to loop. it is like never ending. please suggest.
https://smartsheet.redoc.ly/tag/reports#operation/getReport
offset is a parameter i gave as 0 for incrementing in nexUrl page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2023 07:55 AM
I think you are very close given your screenshot. But you want to get the next page as long as:
$totalRowCount > ((snap.out.totalCount+1) * 1000)
Then next url is built with
...page=" + (snap.out.totalCount+2) + "...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2023 03:47 AM
Thank you! Some How it is not fetching the last page data. I had to change Has next url to something like below:
$entity.rows.length==100. so that it loops till the rows are 100. if rows array is not 100, which means there is no further data.
Thanks for the Help!