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

how to pass the value of call1 into call2 in accountEntImportJSON for REST Connector

trivi
New Contributor II
New Contributor II

This is regarding the rest connector.We are trying to import the accountentitlements using the REST connector. However the API has no authentication type mechanism. When we call the login API we get res response of token(custom value) in the in the header in response.we wanted to pass that token value to call the actual API by passing this header value.

{
    "authentications": {
        "acctAuth": {
            "authType": "??",
            "url": "http://<hodtname>/Authorization/login",
            "httpMethod": "POST",
            "httpParams": {
               "ApplicationName":"Saviynt"
                "apiKey": "XXXXXX",
            },
            "httpHeaders": {
                "contentType": "application/json"
            },     
            "httpContentType": "application/json",
            "expiryError": "ExpiredAuthenticationToken",
            "authError": [
                "invalid credentials",
                "AuthenticationFailed",
                "HTTP error code : 401"
            ],
            "timeOutError": "Read timed out",
            "errorPath": "error.code",
            "maxRefreshTryCount": 3,
            "tokenResponsePath": "",
            "tokenType": "",
            "accessToken": "",
            "retryFailureStatusCode": [
                500,
                502,
                401
            ]
        }

Here the only difference is the login url returns a custom token in the header with "secuiryheader". This needs to be passed in the actual import call.

Any suggestions?

2 REPLIES 2

SB
Saviynt Employee
Saviynt Employee

You can try to define the response path which provides the token value against tokenResponsePath. And then give a dummy value for  "accessToken": "",

And you should be able to use ${access_token} variable in your ImportJSON.


Regards,
Sahil

rushikeshvartak
All-Star
All-Star

{
    "authentications": {
        "acctAuth": {
            "authType": "oauth2",
            "url": "http://<hodtname>/Authorization/login",
            "httpMethod": "POST",
            "httpParams": {
               "ApplicationName":"Saviynt"
                "apiKey": "XXXXXX",
            },
            "httpHeaders": {
                "contentType": "application/json"
            },     
            "httpContentType": "application/json",
            "expiryError": "ExpiredAuthenticationToken",
            "authError": [
                "invalid credentials",
                "AuthenticationFailed",
                "HTTP error code : 401"
            ],
            "timeOutError": "Read timed out",
            "errorPath": "error.code",
            "maxRefreshTryCount": 3,
            "tokenResponsePath": "",
            "tokenType": "",
            "accessToken": "",
            "retryFailureStatusCode": [
                500,
                502,
                401
            ]
        }

 

Can you share postman screnshot


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