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

call2 should be called upon condition

kolipakularavi
New Contributor
New Contributor

Hi Team,

We have two calls inside the add access JSON.  after first call, second call has to be requested based upon the condition if the entitlement value(xxx-publisher-xxx) contains publisher then only 2nd call has to requested

 

{
"call": [
{
"name": "Role",
"connection": "userAuth",
"url": "https://key.m.pipedream.net/scim2/Groups/${entitlementValue.entitlementID}",
"httpMethod": "PATCH",
"httpParams": "{\"schemas\": \"\",\"Operations\": [{\"op\": \"add\",\"value\": {\"members\": [{\"\\$ref\": \"https://scim2/Users/${account.accountID}\",\"display\": \"${user.username}\"}]}}]}",
"httpHeaders": {
"Authorization": "Basic c2NpbV91c2VyOjFxYXoyd3N4QEE=",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200,
204
]
},
"unsuccessResponses": {
"statusCode": [
401,
400,
500
]
}
},
{
"name": "call2",
"connection": "${if{entitlementValue.entitlement_value.contains('publisher'))? \"userAuth\":\"\";}}",
"url": "https://key.m.pipedream.net/scim2/Users/${account.accountID}",
"httpMethod": "PATCH",
"httpParams": "{\"schemas\": \"\",\"Operations\": [{\"op\": \"add\",\"value\": {\"members\": [{\"$ref\": \"https://${account.accountID}\",\"display\": \"${user.username}\",\"EnterpriseUser\":{\"${if(entitlementValue.entitlement_value.containsKey('unitA')) {unitA}}}\"}]}}]}",
"httpHeaders": {
"Authorization": "Basic c2NpbV91c2VyOjFxYXoyd3N4QEE=",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200,
204
]
},
"unsuccessResponses": {
"statusCode": [
401,
400,
500
]
}
}

]
}

Please help whether this is correct or not. What are the other ways we can achieve this.

 

Regards,

Ravi

[This post has been edited by a Moderator to remove sensitive information.]

1 REPLY 1

rushikeshvartak
All-Star
All-Star

This is correct format do you facing any issue?

 

please remove confidential information 

 


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