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
| Key | Type | Description | Note |
|---|---|---|---|
| request_guid | String | Explanation request GUID | 36 characters |
Body parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| type | Yes | String | Explanation type | EXPLANATION, AUDITOR_COMMENT, or MANAGER_COMMENT |
| token | No | String | Guest access token | Can be used instead of session authentication |
| status | Yes | String | Explanation status | |
| result | Yes | 32-bit integer | Result code | |
| content | Yes | String | Explanation 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"
}