Remove Attachments or Delete Latest Versions
Use this API to remove multiple attachments within the same request. You must specify the version to remove.
Method
DELETE
URL
/v2/<object_full_identifier>/<record_uuid>/attachment
Parameters
names: Comma-separated list of file names to delete.
version: Supported values are all and latest.
all: All versions of the specified attachments are removed, and the attachment itself is removed from the record.
latest: Only the latest version of a specified attachment is removed. If additional versions of an attachment exist, the attachment is not removed from the record. If no other versions exist, the attachment itself is removed from the record.
Response Content Type
n/a
Input Examples
Following is an example of how to remove all versions of an attachment named file1.txt from a Showcase record. The input should be a DELETE request with the following URL:
DELETE https://localhost:8080/v2/io_showcase/42f64596-c42f-4ba2-8138-cc40188d2a88/attachments?names=file1.txt&version=all
Following is an example of how to remove the latest version of an attachment named file1.txt from a Showcase record. The input should be a DELETE request with the following URL:
DELETE https://localhost:8080/v2/io_showcase/42f64596-c42f-4ba2-8138-cc40188d2a88/attachments?names=file1.txt&version=latest
The example request removes the latest version of file1.txt from the specified Showcase record. If there is only one version of the file, the attachment itself is removed from the Showcase record.
Error Response Messages
HTTP Status Code
Error Message
400
The object identifier or record UUID were not specified or are invalid.
The names or version parameters were not specified or are invalid
404
The record specified to remove attachments from was not found (or user has no permission to access it)
Any of the file names specified on the names parameter was not found as an attachment for the specified record
500
Internal Server error
For more information:
Was this helpful?