Deleting an Attachment
To delete an attachment you’ll need its ID.
HTTP-Method
DELETE
Path
/api/rest/v3/frontend/attachments/{attachmentId}
Authentification
Path Parameter
-none-
Query Parameter
attachmentId
Responses
Action | Response | Description |
---|---|---|
success | 200 | The attachment has been delted successfuly |
authorization error | 401 / 403 | See here and here for details. |
not found | 404 – { “code”: “get_file_error”, “message”: “No attachment with id X found” } | No attachment could be found for the given ID |
not editable | 400 – { “code”: “application_access_error”, “message”: “Application is not editable anymore” } | The application is not editable anymore. |
Example call with curl and user access token
1 |
curl -i -H "Authorization: Bearer a88a95e3-c7ed-4619-abfe-de84165a6ba6" -X DELETE "https://api.softgarden.io/api/rest/v3/frontend/attachments/f81b7517-95cb-4172-a2df-c0ad2fdbf7c9" |