07/28/2022 05:31 AM
Hi Team,
We have couple of powershell scripts which will be used for different types of usecases in updateAccountJSON of RestAPI connectors .
We are able to trigger one of the scripts as per standard syntax mentioned below . We want 2 different files with different parameters to be triggered and PowerShell can do its work accordingly . Please help us know if there is any syntax to call 2 files using httpParams ?
"httpParams": "{\"Script\":\"Powershell.exe d:\/Saviynt\/powershell1.ps1 \\\ {user.customproperty44}\\\"\"}"
Above httpParams is used to call powershell1 . Now we need to have if (condition){call powershell1 and call powershell2 ) else {call powershell 2}
Or httpParams syntax which should run both the scripts once rules are triggered .?
#RestAPI , @restAPI , @Connector,#connector
Thanks
ANkit
08/02/2022 11:30 AM
@rushikeshvartak and @avinashchhetri can you please help us with this?
08/02/2022 08:45 PM
"httpParams": "{\"Script\":\"${if(task.tasktype==3){Powershell.exe d:\/Saviynt\/powershell1.ps1 \\\ {user.customproperty44}\\\"\"}else {Powershell.exe d:\/Saviynt\/powershellelse1.ps1 \\\ {user.customproperty44}\\\"\"}}"