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

/v5/getRoles API pagination

ekorh
Regular Contributor
Regular Contributor

Hi,

In our environment we have over 500 roles. I'm trying to build pagination to the Sav4Sav REST connector Roles import in ImportAccountEntJSON. 

The maximum number of roles that the /v5/getRoles API will send in one call seems to be 500. If I put e.g. ?max=1000 at the end of the url I still only get 500 roles.

So how could the pagination be done?

The response from /v5/getRoles API only includes these following fields to use:

{
    "msg": "Successful",
    "displayCount": 500,
    "errorCode": "0",
    "Roledetails": [
        {
            "Custom Property 26": "",
etc. etc. etc....
        }
    ],
    "totalCount": 740
}
 
Thanks already in advance!
2 REPLIES 2

PremMahadikar
Valued Contributor
Valued Contributor

Hi @ekorh ,

Please check this article: Solved: SAV4SAV REST - Account Import Through Analytics -*... - Saviynt Forums - 63159 - This article has similar usecase as yours. 

Quick solution here: 

"pagination": {
"offset": {
"offsetParam": "offset",
"batchParam": "max",
"batchSize": 500,
"totalCountPath": "completeResponseMap.total"
}

 

If this helps your question, please consider selecting Accept As Solution and hit Kudos

rushikeshvartak
All-Star
All-Star

Instead of getRoles ApI use analytics report where you can implement pagination

Refer https://forums.saviynt.com/t5/tag/SAV4SAVPagination/tg-p/board-id/iga


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