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

Webservice api call failed

Vidhya
New Contributor II
New Contributor II

Hi,

We have implemented rest connection in prod where we update few users through analytics using rest connection. It was working fine in both dev and test environments. But it doesn't work in prod environment.

When we run that job, we get webservice Api call failed as below screenshot:

 

Vidhya_1-1694089564143.png

In logs we got below error:

ERROR rest.RestProvisioningService  - Exception in pullObjectsByRest :401

followed by this error

ERROR rest.RestProvisioningService  - Inside token Expiry Exception block.

Please refer to out connection json:

{
"authentications": {
"acctAuth": {
"authType": "oauth2",
"httpHeaders": {
"Accept": "application/json"
},
"authError": [
"InvalidAuthenticationToken"
],
"url": "xxxxxxxxxxxxxxx",
"httpMethod": "POST",
"httpContentType": "application/json",
"errorPath": "error.code",
"maxRefreshTryCount": 2,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "${access_token}",
"httpParams": "{\"username\":\"xxxxx\",\"password\":\"xxxxx\"}",
"retryFailureStatusCode": [
401
]
}
}
}

And below is importuserjson:

{
"connection": "acctAuth",
"successResponses": {
"statusCode": [
200,
201,
202,
203,
204,
205
]
},
"url": "https://xxxxxxxxxxxxx.saviyntcloud.com/ECM/api/v5/fetchRuntimeControlsDataV2",
"httpMethod": "POST",
"httpParams": "{\"analyticsid\":\"xxxx\"}",
"httpHeaders": {
"contentType": "application/json",
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"userResponsePath": "results",
"colsToPropsMap": {
"username": "username~#~char",
"customproperty16": "Days~#~char"
},
"errorCode": "400",
"errorCodePath": "errorCode"
}

 

Can someone please help in resolving this issue. 

 

3 REPLIES 3

puneetkhullar
Saviynt Employee
Saviynt Employee

Hi @Vidhya Since you're using fetchRuntimeControlsDataV2 API that needs to pass some dynamic variable along with the analyticsID: 

Please review this doc and check the mandatory params. 

https://documenter.getpostman.com/view/20697337/2s8Z72WCSb#6031b102-593c-41fc-90ff-f4c47ce7b6cb

Hi @puneetkhullar ,

We mentioned analyticsid . I can see either analyticsid or analytics name are mandatory params in above documents.

Do we need to use fetchControlDetailsES for runtime analytics?

Can you brief it ?

Thanks,

Vidhya

Hi @Vidhya 

Are you using run time analytics or a sql analytics with v2 version. if you are using runtime then you will have a dynamic variable which needs to be passed in the json with analytics id or name.

 

Thanks

Darshan