Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
07/10/2024 06:24 AM
Hi team,
I need to configure a response message from the update account API call as successfull so if that error comes the task is automatically completed.
below is the error response message which I need to pass it in the "success" parameter in json
{"auditDetails":{"call1":[{"headers":null,"message":{"responseMessage":"A record with this combination of values already exists."},"statusCode":400,"description":null,"status":"Failed"},{"headers":null,"message":{"responseMessage":"A record with this combination of values already exists."},"statusCode":400,"description":null,"status":"Failed"}
Here is the json I am using but it is not working, as you can see I passing the response in the "message" parameter
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "sampleurl",
"httpMethod": "POST",
"httpParams": "{\"SecurityContext\":\"Data access set\",\"SecurityContextValue\":\"${requestAccessAttributes?.get('SecurityContextProv')}\",\"RoleNameCr\":\"${requestAccessAttributes?.get('JobRole')}\",\"UserName\":\"${user.username}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/vnd.oracle.adf.resourceitem+json",
"successResponses": {
"message": "A record with this combination of values already exists.",
"statusCode": [
201,
200,
204
]
},
"unsuccessResponses": {
"statusCode": [
400,
403,
401,
404,
409,
501,
500
]
}
}
]
}
07/10/2024 06:27 AM - edited 07/10/2024 06:30 AM
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "sampleurl",
"httpMethod": "POST",
"httpParams": "{\"SecurityContext\":\"Data access set\",\"SecurityContextValue\":\"${requestAccessAttributes?.get('SecurityContextProv')}\",\"RoleNameCr\":\"${requestAccessAttributes?.get('JobRole')}\",\"UserName\":\"${user.username}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/vnd.oracle.adf.resourceitem+json",
"successResponses": [
{
"statusCode": 202
},
{
"responsePath": "auditDetails.call1.message.responseMessage",
"values": ["A record with this combination of values already exists."]
}
],
"unsuccessResponses": {
"statusCode": [
400,
403,
401,
404,
409,
501,
500
]
}
}
]
}
07/10/2024 06:37 AM
Thank you for the response , but it is still not working and the task is in pending state only
07/10/2024 06:39 AM
There is a similar ticket but no solution in this one as well
Define success for API call based on message recei... - Saviynt Forums - 51977
07/11/2024 04:28 AM
@rushikeshvartak Thank you for the response , but the task is still pending with the same error
07/16/2024 03:27 AM
Hello @SSinha_
Please try with the below JSON
{
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "sampleurl",
"httpMethod": "POST",
"httpParams": "{\"SecurityContext\":\"Data access set\",\"SecurityContextValue\":\"${requestAccessAttributes?.get('SecurityContextProv')}\",\"RoleNameCr\":\"${requestAccessAttributes?.get('JobRole')}\",\"UserName\":\"${user.username}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/vnd.oracle.adf.resourceitem+json",
"successResponses": {
"message.responseMessage": "A record with this combination of values already exists.",
"statusCode": [
201,
200,
204
]
}
}
]
}
08/06/2024 08:31 AM
@Vedanth-BK Tried the json, the task is still in pending state
08/07/2024 04:51 AM
@SSinha_ Please share the provisioning comments
08/07/2024 04:54 AM
{"auditDetails":{"call1":[{"headers":null,"message":{"responseMessage":"A record with this combination of values already exists."},"statusCode":400,"description":null,"status":"Failed"},{"headers":null,"message":{"responseMessage":"A record with this combination of values already exists."},"statusCode":400,"description":null,"status":"Failed"}