Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/19/2024 06:39 AM
we need to add the terminationDate in removeAccoount JSON to for removing the account.
the JSON is getting called and i have hardcoded the value.
but the tasks are not getting completed.
issue is in logs i m getting 200 as response for API call.
I am not able to find any specific error.
Has anyone faced such issue before ? i am the logs for reference please search with terminationDate in logs sheet.
06/19/2024 06:49 AM
Can you share json and date needs to be passed as today or from property
06/20/2024 03:39 AM
{
"call": [
{
"connection": "acctAuth",
"url": "https://xyz/v4/Users/${account.customproperty5}",
"httpMethod": "PATCH",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\":[{\"op\": \"add\",\"path\":\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\"value\":{\"terminationDate\":\"2029-12-11T19:28:00Z\",\"companyId\":\"abc\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}
We need date in 2029-12-11T19:28:00Z format, like todays date +1 in this format. with calendar instance method.
\"${Calendar.getInstance().getTime().format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}\"
is it possible to get tomorrow's date with calender.getinstance() method used above.
06/20/2024 06:09 AM
{
"call": [
{
"connection": "acctAuth",
"url": "https://xyz/v4/Users/${account.customproperty5}",
"httpMethod": "PATCH",
"httpParams": "{\"schemas\":[\"urn:ietf:params:scim:api:messages:2.0:PatchOp\"],\"Operations\":[{\"op\": \"add\",\"path\":\"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User\",\"value\":{\"terminationDate\":\"${new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\").format(java.util.Calendar.getInstance(java.util.TimeZone.getTimeZone('UTC')).apply { it.add(java.util.Calendar.DAY_OF_MONTH, 1) }.getTime())}\",\"companyId\":\"abc\"}}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
500,
501,
502,
503,
504
]
}
}
]
}