Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST - Pagination Syntax

nikhil
New Contributor III
New Contributor III

Hi,

I've tried multiple ways of setting up the pagination but haven't been able to successfully get the required results. Only the first page is read. Can you please assist on how can read all the pages through NextURL?

 

"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.get('page.totalPages')>1?null:https://URL/rest/v1/roles?cursor='+response.completeResponseMap.page.number}"
}
}

This is the outcome of the API. I see there are 4 links + the output also has, under page, the current page and number of pages.

nikhil_0-1709722229605.png

 

2 REPLIES 2

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @nikhil,

You may try this,

"pagination": {
"nextUrl": {
"nextUrlPath": "${response?.completeResponseMap?.done==true?null:'base URL'+response.completeResponseMap.nextRecordsUrl}" 
} 
}

or

"pagination": {
"nextUrl": {
"nextUrlPath": "nextUrlPath": "${response?.completeResponseMap?.links[2].href==null?null:'+response?.completeResponseMap?.links[2].href+'}"
}


Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

rushikeshvartak
All-Star
All-Star

Refer https://forums.saviynt.com/t5/identity-governance/pagination-nextrecordsurl/m-p/74841#M47534


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.