09-04-2023 02:13 AM
I am trying to read documents for REST GET snap and for specific ID i am having 918 records and I am only able to access starting 100 record and am not able to traverse next records.
Sample response:
HAS NEXT and NEXT URL :
$entity.pageInfo.totalCount > 100*snap.out.totalCount
_BaseUrl+'/submgmt/api/v1/subscriptions/'+$ID+'/users?skip='+(100*snap.out.totalCount)+'&take=100'
09-05-2023 06:47 AM
following. I have a similar issue, but no count, limit, start.
09-05-2023 08:49 AM
Hi @chmurray88! Am I understanding this correctly that you have an API that is giving you a page of responses, but you don't have any count, limit, start, or similar variables to work with? Are you able to cleanse the data content and show what your response looks like?
09-05-2023 08:48 AM
Hello @rahulkalyanwat, what happens with the 'Has next' and 'Next URL' that you have configured? Does it give you an error, or just never runs again? The response screenshot with "startCount" = 101 makes me think you did fetch a second page of results so I just want to clarify that.
Next URL
I would also ask if you're using the 'REST Get' or 'HTTP Client' Snap? The latter might make this a bit easier for the 'Next URL'. The screenshot below shows a pagination setup I use against SnapLogic's API and you can see I don't have to work with the 'Next URL' at all since SnapLogic can piece it together for me - all that was needed in this situation was to override the 'offset' parameter. Based on what I can see from your override URL "skip" would be the only parameter to override and you could use a value like '$entity.startCount + $entity.limit'.
Has next
For the 'Has next' you could also use this expression so all the variables are based on values from the response instead of trying to use a static '100' and the internal 'snap.out.totalCount':
$entity.startCount + $entity.limit >= $entity.totalCount
09-05-2023 09:20 AM - edited 09-05-2023 09:26 AM
Hi @RogerSramkoski I am Using REST Get snap and Copied Screenshot of Second Page and can you please help me to calculate nexturl as well.
Page 1 response:
REST GET Snap HAS NEXT and NEXT URL: