We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Pagination with url for REST connector Import

JoshuaLawrence
New Contributor III
New Contributor III

Hi,

We are trying to iterate through all the pages for this account import, but cannot figure out how to do so. We specify the page number we want in the url and would like to iterate over it. Unfortunately we don't have any response variable (in the body or header) to keep track of the current page or get the next url. We have to somehow use the page query parameter and add 1 to it in the next URL. Currently this is our ImportAccountEntJSON which is not working:

FYI: In the response headers we do have the following variables but not sure how we can use them in our case:

x-Total-Count, x-Result-Count

 

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "http://<url>/v1/user?page=0&ind-workinfo=true&ind-generalinfo=true",
"httpHeaders": {
"Authentication": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "list",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "userId~#~char",
"name": "userId~#~char",
"customproperty2": "userId~#~char",
"customproperty1": "info.general.fullName~#~char",
"customproperty3": "info.general.shortName~#~char",
"customproperty4": "info.general.userEffectiveDate~#~char",
"customproperty5": "info.general.userExpirationDate~#~char",
"customproperty6": "info.general.userLanguage~#~char",
"customproperty7": "info.general.workPosition~#~char",
"customproperty8": "info.work.workPositionCode~#~char",
"customproperty9": "info.work.workPositionEffectiveDate~#~char",
"customproperty10": "info.work.workPositionExpirationDate~#~char",
"customproperty11": "info.work.approvalLevel~#~char",
"customproperty12": "info.work.functionCode~#~char",
"customproperty13": "info.work.supervisor~#~char",
"customproperty14": "info.work.designate~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.message=='SUCCESS'? 'http://<url>/v1/user?page='+Math.incrementExact(Integer.parseInt(page)):null+'&ind-workinfo=true&ind-generalinfo=true'}"
}
}
}
}
}
}

We also tried this 

 "pagination": {
"page": {
"pageSizeParam": "limit",
"pageSize": 600,
"pageRecordCount": "headers.x-Result-Count",
"pageNumberParam": "page",
"totalCountPath": "headers.x-Total-Count",
"firstPageNumber": 0
}

 

Any ideas how we can do this type of pagination?

Thanks

1 REPLY 1

JoshuaLawrence
New Contributor III
New Contributor III

This has been resolved by using:

 "pagination": {
"page": {
"pageSizeParam": "limit",
"pageSize": 600,
"pageRecordCount": "600",
"pageNumberParam": "page",
"totalCountPath": "headers.x-Total-Count",
"firstPageNumber": 0
}
}