Assign Ticket
Assigns a ticket to the specified users.
Required Permissions
Requires the MEMBER role or higher.
HTTP Request
POST /api/sonar/tickets/:guid/assign
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d type=ASSIGNEE \
-d assignees=fae7fa2b-756e-4d3d-b314-e631daf70c7d \
-X POST \
https://HOSTNAME/api/sonar/tickets/6206eb0e-fb44-4f13-82ca-d92454cfd35e/assign
Request Parameters
Path Parameters
| Key | Type | Description | Note |
|---|---|---|---|
| guid | String | Ticket GUID | 36 characters |
Request Body Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| type | Yes | String | Assigned role | ASSIGNEE or APPROVER |
| assignees | No | List (of strings) | User GUID list | Comma-separated user GUIDs. Replaces the existing assignment with the specified list. Empty list or omitted removes all assignees |
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."
}
Assignment type is missing
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "type should be not null"
}
Ticket is not found
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "ticket not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}