Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/03/2024 09:35 AM - last edited on 09/03/2024 12:06 PM by Dave
Hello Everyone,
I am currently using the following configuration to update a user's login in our Saviynt environment:
{
"actions": {
"Update Login": {
"call": [
{
"name": "Update Login",
"connection": "userAuth",
"url": "https://####-dev.saviyntcloud.com/ECM/api/v5/updateUser",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"username\": \"${user?.username}\", \"customproperty22\": \"IMMEDIATE_TERM\", \"propertytosearch\": \"username\"}",
"httpHeaders": {
"Authorization": \"${access_token}\",
"Content-Type": \"application/json\"
},
"successResponses": {
"message": \"User Updated Successfully\",
"statusCode": [
200,
201
]
}
}
]
}
}
}
Currently, I am passing `"IMMEDIATE_TERM"` in `customproperty22`. However, I would like to replace this with the current date at runtime instead of the fixed string `"IMMEDIATE_TERM"`.
Could you please guide me on how to modify the JSON configuration to pass the current date in the required format?
Thank you!
Chirag Gupta
[This post has been edited by a Moderator to remove sensitive information.]
Solved! Go to Solution.
09/03/2024 09:42 AM
${(new Date()).format('yyyy-MM-dd')}
Refer https://forums.saviynt.com/t5/general-discussions/rest-connector-current-date/m-p/2088#M226