Get Ticket Attachments
Required Permissions
Requires the MEMBER role or higher.
HTTP Request
GET /api/sonar/tickets/:guid/attachments
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/tickets/8de3c683-a793-4bde-bf41-657396d17ef5/attachments
Request Parameter
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Ticket GUID | 36 characters |
Success Response
{
"attachments": [
{
"guid": "75624e2d-dc78-4a21-974b-78c2281dc089",
"user_guid": "ffaf431b-653a-4329-8f83-913cbb00342d",
"ticket_guid": "8de3c683-a793-4bde-bf41-657396d17ef5",
"file_name": "66c7e112-edc9-4b11-b332-5a0581a24211.png",
"file_size": 124109
}
]
}
- attachments (Array): Attachment list
- guid (String): Attachment GUID
- user_guid (String): User GUID
- ticket_guid (String): Ticket GUID
- file_name (String): File name
- file_size (64-bit integer): File size
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
{
"error_code": "illegal-state",
"error_msg": "ticket not found: 49272877-75f2-4c2f-9301-d21c4f9a106c"
}