Delete a file
Written by
Use this request to delete attached files.
Request format
Before making the request, get permission to access the API.
To delete a file, use an HTTP DELETE
request.
DELETE /v2/issues/<issue-id>/attachments/<attachment-id>/
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-ID: <organization ID>
Headers
-
Host
API host address:
https://api.tracker.yandex.net
-
Authorization
OAuth token in
OAuth <token value>
format. For example:OAuth 0c4181a7c2cf4521964a72ff57a34a07
-
X-Org-ID
Organization ID.
Resource
Parameter | Description | Data type |
---|---|---|
<issue-id> | Issue ID or key | String |
<attachment-id> | Unique file ID | String or number |
Example: Delete a file attached to the
JUNE-2
issue.
- An HTTP
DELETE
method is used.DELETE /v2/issues/JUNE-2/attachments/4159/ HTTP/1.1 Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth token> X-Org-ID: <organization ID>
Response format
Request executed successfully
Request failed
If the request is successful, the API returns a response with code 204
.
The response body is missing.
If the request is processed incorrectly, the API returns a response with an error code:
- 404
- The requested object was not found. You may have specified an invalid object ID or key.