Submit explanation

Submits an explanation response for a specified explanation request. This endpoint supports guest access, so it can be called with the token parameter instead of session authentication.

HTTP Request

POST /api/sonar/explanation-requests/:request_guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d type=EXPLANATION \
     -d status=SUBMITTED \
     -d result=1 \
     --data-urlencode content="This access was performed for legitimate business purposes." \
     -X POST \
     https://HOSTNAME/api/sonar/explanation-requests/49272877-75f2-4c2f-9301-d21c4f9a106d
Request Parameters
Path Parameters
KeyTypeDescriptionNote
request_guidStringExplanation request GUID36 characters
Body parameters
KeyRequiredTypeDescriptionNote
typeYesStringExplanation typeEXPLANATION, AUDITOR_COMMENT, or MANAGER_COMMENT
tokenNoStringGuest access tokenCan be used instead of session authentication
statusYesStringExplanation status
resultYes32-bit integerResult code
contentYesStringExplanation body

Success Response

{}

Error Responses

No permission

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}
Not an employee

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "not-employee"
}
Explanation cannot be submitted

HTTP status code 500. Use the get explanation request explainable API to check the reason.

{
  "error_code": "illegal-state",
  "error_msg": "already-submitted"
}