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 10:56 AM
Hello @rahulkalyanwat! Assuming that 'skip' is the correct query parameter and the rest of the URL is accurate, you could replace the expression at the end:
(snap.out.totalCount + 1).toString()
with this:
($entity.startCount + $entity.limit)
One thing I can't see in the previous screenshots though is your initial 'startCount' value. From the response in the original post it looks like 101 already. You may need to double-check that since every API can be different, though typically they would start at record 0 or 1, meaning the first page would be 0-99 or 1-100, next page would be 100-199 or 101-200
09-05-2023 12:20 PM
@RogerSramkoski I tried with HAS NEXT and NEXT URL but it's not working for me and attached the complete REST GET SNAP screenshot below and API first page skip = 0 and startcount=1 each page has 1 to 100 records.
Servirce URL : 'https://api.sendpro360.pitneybowes.com/submgmt/api/v1/subscriptions/7057/users'
09-06-2023 12:36 AM
@RogerSramkoski I tried below HAS NEXT and NEXT URL
$entity.pageInfo.startCount+99 < $entity.pageInfo.totalCount
'https://api.sendpro360.pitneybowes.com/submgmt/api/v1/subscriptions/7057/users?skip='+ (snap.out.totalCount +1).toString()+'&limit=100'
and It's working for me partially. when I am validating the pipeline I see a total count of 921 and a limit of 100. first-page startcount= 1 and the limit 100 for the next page start count should be 101 but it starts from 201 and attached a screenshot for the same.