Pagination script for Account Aggregation

Can someone please help me with the pagination script for below URL to aggregate accounts? Thanks!

/fusion/core/rest/api/0/users?pageNumber=1&resultsPerPage=25&type=company&COMPANY_ID=1

I’m receiving “No Paging steps defined for endpoint” error in CCG logs

Hi @JackSparrow ,

You need to configure the Paging tab of your endpoint configuration to achieve this.


Declare your inital offset as 1 (referring to pageNumber as 1 and can be referred as $offset$) and Page sizing as 25 (which can be referred as $limit$ variable) in your script.

And lastly, write the script with appropriate condition. For example, if you have a varilable called totalpages in your response. You can write the script as below:

TERMINATE_IF $offset$ >= $response.totalPages$
$offset$ = $offset$ + 1
$endpoint.fullUrl$ = $application.baseUrl$ + "/fusion/core/rest/api/0/users?pageNumber="+$offset$+"&resultsPerPage="+$limit$+"&type=company&COMPANY_ID=1"

Hope this helps.

Regards,
Uday Kilambi

1 Like

Thanks much @uday_kilambiCTS. Will check this and update here

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