Paging for internal ISC "Get Accounts List" V3 API

We are using a WebServices SaaS source to provision accounts on a delimited file source.

The account aggregation http method uses SailPoint ISC’s own APIs to pull in account data: GET {{baseUrl}}/accounts?filters=sourceId eq “sourceID”

I am trying to implement Paging, so that I can aggregate all accounts and not just 250 at a time. These are the current Paging settings I am using, can anybody help identify where I am going wrong? Or if this is possible at all?

Initial Page offset = 0

Page size = 250

Paging steps:

$limit$ = 250
TERMINATE_IF $RECORDS_COUNT$ < $limit$
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$ + “v3/accounts?filters=sourceId eq “sourceId”&offset=” + $offset$ + “&limit=250”

When using these settings, only 250 accounts are aggregated.

1 Like

set initial page offset 0

page size 250

$limit$ = 250

TERMINATE_IF $RECORDS_COUNT$ < $limit$

$offset$ = $offset$ + $limit$

$endpoint.fullUrl$ = $application.baseUrl$ + “/v3/accounts?filters=sourceId eq" + $application.attributes.sourceId + ”&offset=" + $offset$ + “&limit=” + $limit$

Thank you for the suggestion. @uppala

Unfortunately this gives the same results (only aggregates 250 accounts) :frowning:

Hi @plewis0208

If your configured baseUrl already includes /v3, then adding /v3 again breaks paging.

TERMINATE_IF ($NO_RECORDS$ == TRUE) || ($RECORDS_COUNT$ < $limit$)
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$ + “/accounts?filters=sourceId%20eq%20%22” + $application.attributes.sourceId + “%22&offset=” + $offset$ + “&limit=” + $limit$

I should add, my base URL is:

https://{tenant}.api.identitynow.com/

And I am inputting the source ID in a literal string, rather than referencing it (not that I expect that to matter)

Try the below: I have just added offset as 0:

$limit$ = 250
$offset$ = 0

TERMINATE_IF $RECORDS_COUNT$ < $limit$
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$
    + "/v3/accounts?filters=sourceId eq "
    + $application.sourceId$
    + "&offset="
    + $offset$
    + "&limit="
    + $limit$
9 Likes

No luck unfortunately :smiling_face_with_tear:

Latest iteration:

$limit$ = 250
$offset$ = 0
TERMINATE_IF $RECORDS_COUNT$ < $limit$
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$ + “v3/accounts?filters=sourceId eq “123456abcdefgh””+ ”&offset=" + $offset$ + “&limit=” + $limit$

that is because you are not sorting and getting count. try adding a sort to end point like name or created etc. that way next page will be retrieved and also get the count in end point so you know when to terminate. your current termination is the first page.

I’ve tried with the following:

$limit$ = 250
TERMINATE_IF ($NO_RECORDS$ == TRUE)
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$ + “v3/accounts?filters=sourceId eq {sourceID}” + “&sorters=id,name”+ “&limit=” + $limit$+ “&offset=” + $offset$

(included the sorters). But the outcome is the same.

Note: The amount of accounts aggregated has increased from 250 to 500 since amending the termination logic to TERMINATE_IF ($NO_RECORDS$ == TRUE), but still it does not aggregate the rest of the accounts (~1300)

@plewis0208 I just ran aggregation with the below pagination.

TERMINATE_IF $RECORDS_COUNT$ < $sysparm_limit$
$offset$ =$sysparm_offset$ + $sysparm_limit$ + 1
$endpoint.fullUrl$ = $application.baseUrl$
    + "/v2025/accounts?"
    + "&offset="
    + $offset$
    + "&limit="
    + $sysparm_limit$

It is bringing the records. I saw it ran 3 times, brought 750 records and then sailpoint threw HTTP 500. So pagination works fine.

I used the sysparm_offset and sysparm_limit variables.

You end script should something like :

$limit$ = 250

$offset$ = 0
TERMINATE_IF $responseHeaders.X-Total-Count$ < $limit$
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$ + “v3/accounts?&count=true&filters=sourceId eq {sourceID}” + “&sorters=id,name”+ “&limit=” + $limit$+ “&offset=” + $offset$

I hope you are using the escape characters around the sourceId in your URL.

This is what we have done in our current project and it brings all the accounts as part of aggregation.

Base URL:
https://{tenant}.api.identitynow.com/v2025
(should work with other versions as well like v3)
Context URL:
/accounts?limit=$limit$&offset=$offset$&filters=sourceId%20eq%20%22SOURCE_ID%22

Pagination Settings:
INITIAL_PAGE_OFFSET = 0
PAGE_SIZE = 250

TERMINATE_IF $RECORDS_COUNT$ < $limit$
$offset$ = $offset$ + $limit$
$endpoint.fullUrl$ = $application.baseUrl$ + “/accounts?limit=” + $limit$ + “&offset=” + $offset$ +“&filters=sourceId%20eq%20%22SOURCE_ID%22”

@plewis0208

Try below

$sysparm_limit$ = 250
TERMINATE_IF $RECORDS_COUNT$ < $sysparm_limit$
$offset$ =$sysparm_offset$ + $sysparm_limit$
$endpoint.fullUrl$ = $application.baseUrl$ + "/v3/accounts?&filters=sourceId eq {sourceID}" + "&offset=" + $sysparm_offset$ + "&limit=" + $sysparm_limit$

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