Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Rest - if else condition entire httpParam

ejeong
Valued Contributor
Valued Contributor

Hello

We are making AzureAD connection and there will be different url and reqeust body based on use case (normal user creation or b2b invitation)

I am aware of that we can use if-else in url part and each attribute in httpParam. But i want to know if i can use if-else for entire httpParam

For examplaw

HttpParam : if condtion A { Json A for request body} else {Json B for different request body}

 

Thanks

2 REPLIES 2

Hemanath
Saviynt Employee
Saviynt Employee

Hi @ejeong ,

Below will help you in addressing your requirement replace validation with your validation statement

"${String modifyReqUrl='https://xyz/';String newReqUrl='https://abc';if(validation=='0'){return newReqUrl;};if(validation=='1'){return modifyReqUrl;}}"

 

Thanks,

Hemanath J

HenryMK
New Contributor III
New Contributor III

Hi,
I've taken care of the line breaks for ease of viewing.
This is a case requesting additional confirmation.

"httpParams": "${
(Conditional statements) ?
'{
\"col1\":\"'+user.systemUserName+'\",\"col2\": \"true\"
}'
:
'{
\"col3\":\"'+ ((Conditional statements) ? 'ValA' : 'ValB') +'\",
\"col4\":\"'+arsTasks.id+'\",
\"col5\":\"REMOVE\"
}'
}"

 I expected that case to be handled normally as well, but it doesn't work.