Webservices Accounts count mismatch from API

Hey guys,

I’m working on a Webservices connector and noticed something odd. when I aggregate the source, the count is showing 100 more than what the API returns.

and in the accounts counts are not matching with what API’s returning

I’m using pagination here. Could this be a pagination issue?

Below is the endpoint:

/users/all?page=1&page_size=100

pagination:

TERMINATE_IF $NO_RECORDS$
$offSet$ = $offSet$ + 1
$endpoint.fullUrl$ = $application.baseUrl$ + "/users/all?page=" +$offSet$+ "&page_size=" +$limit$

Did you initialize the offset value to 0? I think that could be the issue

Yes it is 0. but still the same issue

@selvasanthosh yeah that is the issue your pagenumber is starting with 1 whereas your offset is starting from 0 so after page 1 the offset is again set to 1 and you end up getting same page. Try initializing offset to 1. Please accept it as solution if that fixes your issue

I have changed it to 1 and tried and it’s still the same

@selvasanthosh
Can you update the limit explicitly in the pagination script as below:

TERMINATE_IF $NO_RECORDS$
$offSet$ = $offSet$ + 1
$endpoint.fullUrl$ = $application.baseUrl$ + “/users/all?page=” +$offSet$+ “&page_size=” +“&limit=100

@selvasanthosh can you provide the number of account you see in ISC and Result of import job? Also sample API response

I have tried it, It’s not working.

ACCOUNTS SCANNED in the Aggregation - 53,924

Records in the API - 53,824

Accounts in ISC after aggregation - 53,734

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