Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Rest- RemoveAccessJson -- Getting 500 status code

npise
New Contributor III
New Contributor III

@rushikeshvartak @sk 

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:

npise_0-1683849978512.png

 

5 REPLIES 5

SB
Saviynt Employee
Saviynt Employee

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


Regards,
Sahil

npise
New Contributor III
New Contributor III

@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.. 

Vedanth_BK
Saviynt Employee
Saviynt Employee

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

Vedanth_BK_0-1684124757815.png

 

npise
New Contributor III
New Contributor III

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"}}

npise
New Contributor III
New Contributor III

after further research found out was missing tenantID; retried using "DELETEWITHBODY" now i am getting success response. thanks!