02-13-2019 05:23 AM
A very good explanation of how to implement pagination in REST API in this below blog post:
When I try to implement the same(I am extracting data from survey monkey api), I have noticed that when the “Next URL” is executing it is ignoring the query parameters provided.As shown in below image, when service URL is executing it’s getting right records considering all input query parameters i.e total:3043 but when “Next URL” is hitting it is extracting all records i.e. total : 61896
How to include query parameters in “Next URL” to get required data?
02-15-2019 07:58 AM
Thank you ptaylor, for timely responses.
I tried with specified Has next and Next URlL parameters but no luck
As I have stated earlier in the second iteration it’s fetching all the total records ignoring query parameters.
02-15-2019 08:53 AM
Unfortunately, the Survey Monkey API is omitting all of the other query parameters that are not paging-related from the URLs under ‘links’. So you’ll have to add them to the Next URL:
$entity.links.next + “&start_created_at=” + Date.now().minusDays(10) + “&end_created_at=” + Date.now().minusDays(1) + “&sort_by=date_modified&sort_order=DESC”
02-18-2019 05:20 AM
I have tried this option earlier to posting in the community, it works when you specify Next URL with little modification as :
$entity.links.next + “&start_created_at=” + Date.now().minusDays(10) + “&end_created_at=” + Date.now().minusDays(1)
I suggest you to include this exception in the documentation for REST Snap i.e. Survey Monkey API will not accept “offset” value and it will omit query parameters.
Thank you ptaylor :+1:
02-19-2019 09:26 AM
@Siva_Venna, a ticket has been created for the Doc team.
09-03-2023 11:41 PM
I am facing a Pagination issue while using re
st get the snap can you please help me with has next and next url.
https://api.XXXXXXXX.com/submgmt/api/v1/subscriptions/7057/users?limit=100&skip=
sample page info :
},
"entity": {
"pageInfo": {
"totalCount": 109,
"startCount": 1,
"limit": 100
},