Cancel ticket attachment token

Revokes a token issued by the Create ticket attachment token endpoint and cancels the in-progress file upload. Call it when you abandon the upload before reaching the Create ticket attachment step of the workflow.

Required Permissions

Available to any authenticated user.

HTTP Request

DELETE /api/sonar/ticket-attachment-tokens/:token
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -X DELETE \
     https://HOSTNAME/api/sonar/ticket-attachment-tokens/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Request Parameters
Path Parameters
KeyTypeDescriptionNotes
tokenStringFile upload token36 characters

Success Response

{}

Error Responses

Token is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "token should be not null"
}
Upload token does not exist or has expired

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "stream-not-found: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}