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-13-2019 09:41 AM
Please share your configuration of the Snap’s settings.
02-14-2019 02:39 AM
below is configuration of Snap’s settings.
service URL: https://api.surveymonkey.net/v3/collectors/xxxxx/responses/bulk
In the “Next URL” i have replaced “offset” with “page” api is throwing error as bad request, may be api don’t accept parameter as offset.error below
02-14-2019 08:41 AM
I can’t see the entire expression for Next URL in your screen capture, but it seems more complicated than it needs to be. Try this: “https://api.surveymonkey.net/v3/collectors/xxxxx/responses/bulk?per_page=” + ($entity.per_page) + “&page=” + ($entity.page + 1)
02-14-2019 09:02 AM
Actually, after looking at the Survey Monkey API docs, I think it’s even easier. Try this:
Has next: ‘next’ in $entity.links
Next URL: $entity.links.next