Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Pagination Issue for Rest

GPS
New Contributor III
New Contributor III
Hello All,

I am trying to set pagination and facing an issue with it. I tried constructing it based on the response i am getting from postman/Saviynt log.

URL
:  https://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/lists/_generic?_lplFilter=Actor.IsActorDisabl...
Next URLhttps://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/lists/_generic?_lplFilter=Actor.IsActorDisabl...

API response:

 

{
        "_count": 253979,
        "_links": [
            {
                "rel": "self",
                "href": "../lists/_generic?_lplFilter=Actor.IsActorDisabled%3Dfalse&_fields=Actor%2CMingleId&_limit=100000"
            },
            {
                "rel": "next",
                "href": "../lists/_generic?_lplFilter=Actor.IsActorDisabled%3Dfalse&_limit=100000&Actor=401807&_rkn=%20&_fields=Actor%2CMingleId&_paging=NEXT&_position=true"
            },
            {
                "rel": "prev",
                "href": "../lists/_generic?_lplFilter=Actor.IsActorDisabled%3Dfalse&_limit=100000&Actor=%23N%2FA&_rkn=%20&_fields=Actor%2CMingleId&_paging=PREVIOUS&_position=true"
            }
        ]
    },


Pagination:
"pagination": {
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?._links[1]?.href == null || response?.completeResponseMap?._links[1]?.href == '') ? '' : 'https://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/' + (response?.completeResponseMap?._links[1]?.href.replaceAll('../', ''))}"
}
}




Error:
2024-09-29T22:57:52-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-z48t4-DEBUG
-
Got Webservice API Response: [error:Error Illegal character in path at index 1: ${(response?.completeResponseMap?._links[1]?.href == null || response?.completeResponseMap?._links[1]?.href == '') ? '' : 'https://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/' + (response?.completeResponseMap?._links[1]?.href.replaceAll('../', ''))}]

 

 
2024-09-29T22:57:52-05:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-5-z48t4-DEBUG-pullObjectsByRest - responseStatusCode ::null
 
2024-09-29T22:57:52-05:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-5-z48t4-DEBUG-Got showLogs = true
 
2024-09-29T22:57:52-05:00-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-5-z48t4-DEBUG-Got null response statusCode with erroMsg - [error:Error Illegal character in path at index 1: ${(response?.completeResponseMap?._links[1]?.href == null || response?.completeResponseMap?._links[1]?.href == '') ? '' : 'https://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/' + (response?.completeResponseMap?._links[1]?.href.replaceAll('../', ''))}]
 
2024-09-29T22:57:52-05:00-ecm-worker-rest.RestProvisioningService-quartzScheduler_Worker-5-z48t4-ERROR-Exception in getting response in pullObjectsByRest :
 
2024-09-29T22:57:53-05:00-ecm-worker--null-z48t4--java.lang.Exception: NullResponseFromTarget at com.saviynt.provisoning.rest.RestUtilService.checkForErrorMsg(RestUtilService.groovy:1463) at com.saviynt.provisoning.rest.RestProvisioningService.pullObjectsByRest(RestProvisioningService.groovy:4551) at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsByPagination(RestProvisioningService.groovy:4256) at com.saviynt.provisoning.rest.RestProvisioningService.processAccounts(RestProvisioningService.groovy:4183) at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFinal(RestProvisioningService.groovy:1689) at com.saviynt.provisoning.rest.RestProvisioningService.processAccountsFullBySequentialAndIterative(RestProvisioningService.groovy:1653) at com.saviynt.provisoning.rest.RestProvisioningService.importAccountsFull(RestProvisioningService.groovy:1475) at com.saviynt.provisoning.rest.RestProvisioningService.doImport(RestProvisioningService.groovy:139) at com.saviynt.ecm.integration.ExternalConnectionCallService.invokeExternalMethod(ExternalConnectionCallService.groovy:233) at ApplicationDataImportJob.execute(ApplicationDataImportJob.groovy:211) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
4 REPLIES 4

rushikeshvartak
All-Star
All-Star

"pagination": {
"nextUrl": {
"nextUrlPath": "${(response?.completeResponseMap?._links[1]?.href == null || response?.completeResponseMap?._links[1]?.href == '') ? '' : 'https://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/' + java.net.URLEncoder.encode(response?.completeResponseMap?._links[1]?.href.replaceAll('../', ''), 'UTF-8')}"
}
}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

GPS
New Contributor III
New Contributor III

@rushikeshvartak 

I am still getting the same error.
DEBUG-Got Webservice API Response: [error:Error Illegal character in path at index 1:

also tried this still no luck.
https://forums.saviynt.com/t5/identity-governance/rest-apis-add-remove-json-are-failing/m-p/113622


GPS
New Contributor III
New Contributor III

@rushikeshvartak 

I also tried hardcoding the URL:

"pagination": {
                    "nextUrl": {
                        "nextUrlPath": "${(response?.completeResponseMap?._links[1]?.href == null || response?.completeResponseMap?._links[1]?.href == '') ? '' : 'https://custom.suite.com/TR/FSM/fsm/soap/classes/Actor/lists/_generic?_lplFilter=Actor.IsActorDisabled%3Dfalse&_limit=100000&Actor=401807&_rkn=%20&_fields=Actor%2CMingleId&_paging=NEXT&_position=true'}"
                    }
                }


Still the same error:
DEBUG-Got Webservice API Response: [error:Error Illegal character in path at index 1:

GPS
New Contributor III
New Contributor III

Hello All,

Can someone help me with this issue?