I’m working on pagination of NERM API where i used metadata=true to get the next set of accounts.
TERMINATE_IF $RECORDS_COUNT$ < $pageSize$ OR $response._metadata.next$ IS NULL OR $response._metadata.next$ == ""
$endpoint.fullUrl$ = $application.baseUrl$ + $response._metadata.next$
But when I try to aggregate, the count is 200, but the actual record came into SailPoint as 100, but I have 131 accounts total. Any idea how to resolve this?
Check your API (response strcuture carefully) , and ensure thatSailpoint is mappings are: record path - accounts ; total count path - metadata.count; next page path -metadata.next; stop condition next == null
yes, mate SP must know where is the current account array is, where the next - page info is and where the total account is…BUT ONLY THE ACTUAL ARRAY (ACCOUNTS) SHOULD BE AGGREGATED
so to fix this YOU MUST map the pagiantion variables relative to the absolute root ($) while the account attributes remain relative to the Root Path ($.profiles)
@SivaLankapalli@srezzaki@jorgedeloittespain Thanks for your inputs. I have tried the pagination script, but it is not working as expected for NERM APIs. At last I found the solution.
What have I tried so far?
Set the root path as $ and add the pagination attributes to store metadata values like total, offset, and next.
Tried different ways to configure the pagination script as below.
Since the metadata.next keep goes on to 100,200, if we use it in a pagination script, it will be considered a loop, and the aggregation will run forever. The pagination script will never work even if you try with different settings.
Solution
Remove the /api from baseUrl
Add the /api in the context url of the Account Aggregation Operation as below
/api/profiles?&profile_type_id=<profileid>
Now add the metadata, limit and offset to the context url as below