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

Having trouble passing substring to URL for API call

Scott
Visitor
Visitor

We are having an issue with passing a variable substring into the URL for an API call. We are trying to integrate Adobe Workfront with Saviynt and have some properties that need to be modified before we can send them to the target application and retrive a unique object ID. We are using multiple API calls to accomplish this.

 

Here's an example:
There is a resource called Home Team in WF that we need to map to a department name. The department names in Saviynt follow the convention "Department Name (XXX)", and we have to pass the Department Name without the number code to WF to retrieve the object ID. Here's the JSON we are using.

 
{
    "accountIdPath": "call3.message.data.ID",
    "dateFormat": "",
    "responseColsToPropsMap": {
        "accountID": "call3.message.data.ID~#~char"
    },
    "call": [
        {
            "name": "call1",
            "connection": "acctAuth",
            "url": "https://URL/team/search?name_Mod=contains&name=
${user.departmentname.substring(0, user.departmentname.lastIndexOf(' '))}",
            "httpMethod": "GET",
            "httpContentType": "application/json",
            "httpHeaders": {
                "apiKey": "xxxxxxxxxxxxxxxxxxxxxx",
                "accept": "application/json"
            }
        },
        {
            "name": "call2",
            "connection": "acctAuth",
            "url": "https://<URL>/group/search?name_Mod=contains&name=
${user.orgunitid.substring(0, user.orgunitid.lastIndexOf(' '))}",
            "httpMethod": "GET",
            "httpContentType": "application/json",
            "httpHeaders": {
                "apiKey": "xxxxxxxxxxxxxxxxxxxxxx",
                "accept": "application/json"
            }
        },
        {
            "name": "call3",
            "connection": "acctAuth",
            "url": "https://<URL>/user?updates",
            "httpMethod": "POST",
            "httpParams": "{\"homeGroupID\":\"${response.call2.message.data[0].ID}\",\"homeTeamID\":\"${response.call1.message.data[0].ID}\"}",
            "httpHeaders": {
                "apiKey": "xxxxxxxxxxxxxxxxxxxxxx",
                "Accept": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    400,
                    401,
                    404,
                    405,
                    500
                ]
            }
        }
    ]
}

Here's the error we are resceiving: 

{"auditDetails":{"call1":[{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}]},

Any help would be appreciated.

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Does hardcoded value works from saviynt ?


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

rushikeshvartak
All-Star
All-Star

"https://<URL>/team/search?name_Mod=contains&name=${user.departmentname != null ? user.departmentname.substring(0, user.departmentname.lastIndexOf(' ')) : ''}"


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

Scott
Visitor
Visitor

We can't use hardcoded values because the departments and divisions are updated frequently. 
I tried this URL and got the same error: "call1":{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}}


I understand you can’t hardcode just validate if hardcode value works and no issue with import. 


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