WebServices Pagination

Hello,

I have an API that I has a limit of 50 for returning users, and I need an AfterOperationRule to help format the data correctly.
When I add in the rule pagination breaks and won’t run past that initial first call.
First call: /profiles.json?per_page=10
Pagination settings:
Initial offset = 1
page size =10
Steps:
TERMINATE_IF ($NO_RECORDS$ == TRUE)
$sysparm_offset$ = $sysparm_offset$ + $offset$
$endpoint.fullUrl$ = $application.baseUrl$ + “/profiles.json?per_page=”+$limit$+“&page=” + $sysparm_offset$

My Questions are:

  1. Has anyone encountered AfterOperationRules breaking pagination before
  2. Is there any good way to increment pagination by 1? I need to start pagination from page 2 (first call is technically page 1), to ensure the number of accounts on an aggregation and the accounts line up.

Regards Brendon

Minor config issue on the call in the webservices conenctor, pagination itself wasnt the issue.
Re 2. I didn’t realise you could increment the $offset$ value, I thought it was permanently static.

I wanted to aggregate only 50 user ,Can we do that using pagination ?

Does your source API support “limit” query parameter? If it does, you can simply put it in your context URL and ignore the pagination altogether

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.