Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/03/2024 08:26 AM - last edited on 10/03/2024 09:07 AM by Dave
Hi folks
I've an addaccess json
{
"call": [
{
"name": "Role",
"connection": "userAuth",
"url": "https://url/compass/v1/post-users-save",
"httpMethod": "POST",
"httpParams": "{ \"name\": \"${user.displayname}\", \"email\": \"${user.email}\", \"productOwner\": \"${if{requestAccessAttributes?.get('productowner') == 'BOTH' ? 'ID1;ID2' : requestAccessAttributes?.get('productowner')}\", \"role\": \"${entitlemntValue.entitlement_value}\", \"validity\": \"${Calendar.getInstance().with { it.add(Calendar.DAY_OF_YEAR, +365); it.time }.format('yyyy-MM-dd HH:mm:ss')}\" }",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
but the result is
dynamic attribute configuration
I've check with testconnectionparams for validity field in the connectionjson it was success
[This post has been edited by a Moderator to merge two posts.]
Solved! Go to Solution.
10/03/2024 09:22 AM - edited 10/03/2024 09:23 AM
10/03/2024 09:30 AM - edited 10/03/2024 09:45 AM
there is no issue with that variable, I also used that variable for create accountjson and it was a success
{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://url/compass/v1/post-users-save",
"httpMethod": "POST",
"httpParams": "{ \"name\": \"${user.displayname}\", \"email\": \"${user.email}\", \"productOwner\": \"\", \"role\": \"\", \"validity\": \"\" }",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
result
the logs:
10/03/2024 09:54 AM - edited 10/03/2024 09:56 AM
@alvian try this
{
"call": [
{
"name": "Role",
"connection": "userAuth",
"url": "https://url/compass/v1/post-users-save",
"httpMethod": "POST",
"httpParams": "{ \"name\": \"${user.displayname}\", \"email\": \"${user.email}\", \"productOwner\": \"${(requestAccessAttributes?.get('productowner')) == 'BOTH' ? 'ID1;ID2' : requestAccessAttributes?.get('productowner')}\", \"role\": \"${entitlemntValue.entitlement_value}\", \"validity\": \"${Calendar.getInstance().with { it.add(Calendar.DAY_OF_YEAR, +365); it.time }.format('yyyy-MM-dd HH:mm:ss')}\" }",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
10/03/2024 10:26 AM
"httpParams": "{ \"name\": \"${user.displayname}\", \"email\": \"${user.email}\", \"productOwner\": \"${(requestAccessAttributes?.get('productowner') == 'BOTH') ? 'ID1;ID2' : requestAccessAttributes.get('productowner')}\", \"role\": \"${entitlementValue.entitlement_value}\", \"validity\": \"${Calendar.getInstance().with { it.add(Calendar.DAY_OF_YEAR, +365); it.time }.format('yyyy-MM-dd HH:mm:ss')}\" }",
I using this httpparams above and it was success.. thanks