and more in a single search tool across platforms. Read the announcement here. |
05/11/2023 05:08 PM
Here is the removeAccessJSON
{
"call": [
{
"name": "Role",
"connection": "acctAuth",
"url": "https://api5.fastpathassure.com/api/core/userroles",
"httpMethod": "DELETE",
"httpParams": "{\"UserRoles\": [{\"roleId\": ${entitlementValue.entitlementID}, \"userId\": \"${account.accountID}\"}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"TenantId": "XXXXXXX"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201
]
},
"unsuccessResponses": {
"statusCode": [
400,
403,
401,
404,
409,
501,
500,
null
]
}
}
]
}
After running wsretry in provisioning comment shows
{
"auditDetails": {
},
"Role": {
"headers": {
"Access-Control-Expose-Headers": "Request-Context",
"X-Request-ID": "ddc58610-1e9d-418c-b5a1-012f84d0727c",
"Connection": "keep-alive",
"Content-Length": "36",
"Date": "Thu, 11 May 2023 23:39:23 GMT",
"Content-Type": "application/json; charset=utf-8",
"Request-Context": "appId=cid-v1:d72056c3-9347-4ede-9387-4002a3f9d50a"
},
"message": { "Message": "An error has occurred." },
"statusCode": 500,
"description": null,
"status": "Failed"
}
NOTE: from postman i get 200 as response:
Solved! Go to Solution.
05/12/2023 12:41 PM - edited 05/12/2023 12:41 PM
Can you update ConfigJSON param in the REST connection with value {"showLogs":true} if not done already. Run the job again and search for below string in the logs. You should be able to see if the attributes values are being passed in the required format.
Calling Webservice Url
05/12/2023 03:44 PM - edited 05/12/2023 03:46 PM
@SB showlog is set to true. ran the wsretry job searched based on below string and attached is the whole output i still see 500..
05/14/2023 09:27 PM
Hi @npise
Analyzing the screenshot, debug logs and the JSON provided above I see that the HttpMethod is DELETE and has body parameters. In such cases, the HttpMethod in the JSON needs to be DELETEWITHBODY
for more information and sample, please refer to the REST connector Guide under the developer's handbook.
Thank you
Vedanth B.K
05/15/2023 08:32 AM - edited 05/15/2023 08:59 AM
I tried with "DELETEWITHBODY" and its not working.. still getting 500. below is the details from the provisioning comments..
NOTE: this is removeAccess and not removeAccount
{"auditDetails":{"Role":[{"headers":{"Access-Control-Expose-Headers":"Request-Context","X-Request-ID":"9f2abf02-b61e-4f97-9aeb-a5d7faf24781","Connection":"keep-alive","Content-Length":"36","Date":"Mon, 15 May 2023 15:14:48 GMT","Content-Type":"application/json; charset=utf-8","Request-Context":"appId=cid-v1:d72056c3-9347-4ede-9387-4002a3f9d50a"},"message":{"Message":"An error has occurred."},"statusCode":500,"description":null,"status":"Failed"}]},"Role":{"headers":{"Access-Control-Expose-Headers":"Request-Context","X-Request-ID":"5708ef63-1651-46b9-8c60-37e33b4ebcd4","Connection":"keep-alive","Content-Length":"36","Date":"Mon, 15 May 2023 15:29:24 GMT","Content-Type":"application/json; charset=utf-8","Request-Context":"appId=cid-v1:d72056c3-9347-4ede-9387-4002a3f9d50a"},"message":{"Message":"An error has occurred."},"statusCode":500,"description":null,"status":"Failed"}}
05/19/2023 04:56 PM
after further research found out was missing tenantID; retried using "DELETEWITHBODY" now i am getting success response. thanks!