Delete object

The DELETE method removes a previously stored object by using the object identifier. The URL consists of the vault name followed by the object identifier. This operation reports success if the object was deleted from the system.

If the object was already deleted or never existed, an error is returned. The HTTP API does not allow a delete operation to be performed on an object that is still being written. It is because an object identifier is not provided to the caller until the write operation is finished. If a delete operation is performed on an object that is being read, the read might be interrupted. While the HTTP protocol does not allow a specific error message to indicate when it occurs, a second attempt to read the same object results in a 404 Not Found error.

Sample request


DELETE /vault-name/d6133cd067ad4ea38cdcd1faa1e4e9040000 HTTP/1.1
Host: access.example.com
An object is removed from a vault that is named vault-name by using the access server access.example.com.

Sample response


HTTP/1.1 204 No Content
Server: Cleversafe/3.2.0.0
Accept-Ranges: bytes
Date: Wed, 25 Sep 2013 14:38:12 GMT
X-SOH-Version: 2.5
X-Clv-Request-Id: a3378bc8-ab5b-4603-be35-751a7331fd31
The response indicates that the object is removed.

Status codes

Table 1. Delete object - status codes
Code Status Description
204 No Content The object was successfully removed from the vault.
400 Bad Request The request could not be understood by the access server due to malformed syntax.
401 Unauthorized User authentication is needed. The request either did not provide correct credentials or the user does not have permission to read from the indicated vault.
403 Forbidden The client has insufficient privileges to perform the operation.
404 Not Found No such object exists in the vault.
500 Internal Server Error An internal error was encountered on the access server. It is an unrecoverable error. Details can be provided in message body.