REST Connector - Pagination issue

rohitkumarraj
New Contributor III
New Contributor III

Hi, I am facing an issue with pagination functionality in REST Connector.

I am trying to follow the steps as mentioned in REST Connector guide and here is what i have configured for Pagination in ImportAccountEntJSON for account import:

"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.nextUri==null?null:response.completeResponseMap.nextUri}"
}
}

This section of logic is working fine and Saviynt able to fetch next url and trying to execute. But the Problem is, NextUri returns only the half of the original URL. Screenshot from Postman below:

rohitkumarraj_0-1655116018702.png

 

Since, Saviynt getting only half part of url in response hence it's unable to import next sets of data.

To resolve this, I need to append original URL(https://api.abcxyz.cloud) to response of nextUrl to make it a complete and valid URL to fetch data. 

I couldn't find any such example on forum how I can do that. Trying with concat function but does not  working. May be I am not doing it in right way. My attempt:

"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.nextUri==null?null:concat('https://api.abcxyz.cloud',response.completeResponseMap.nextUri)}"
}
}

Can anyone assist me here, how to achieve this?

Thanks

Rohit

1 REPLY 1

rohitkumarraj
New Contributor III
New Contributor III

This got resolved.

Tried below format and it worked for me.

"pagination": {
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?.nextUri==null)?null:'https://api.abcxyz.cloud' + response.completeResponseMap.nextUri}"
}
}