Submit Ticket
Submits a ticket for approval.
Required Permissions
Requires the MEMBER role or higher, and the account must be assigned as an assignee of the ticket.
HTTP Request
POST /api/sonar/tickets/:guid/submit
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X POST \
https://HOSTNAME/api/sonar/tickets/6206eb0e-fb44-4f13-82ca-d92454cfd35e/submit
Request Parameter
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Ticket GUID | 36 characters |
Success Response
{}
Error Responses
Identifier is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}
Ticket is not found
HTTP status code 500. Ticket repository privileges are required.
{
"error_code": "illegal-state",
"error_msg": "ticket not found: 201dc306-5ef7-4d4f-b872-1fa0f4d7dc57"
}
Approver is not assigned
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-approvers"
}
No assignee privileges
HTTP status code 500. Only the assignee is allowed to submit the ticket.
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}
Task is not completed yet
HTTP status code 500. Approval can only be requested for a ticket once the assigned task has been completed.
{
"error_code": "illegal-state",
"error_msg": "not-completed"
}