Delete object

 
MethodURIDescription
DELETE/v1/{account}/{container}/{object}​{?multipart-manifest}

Permanently deletes an object from the object store.

You can use the COPY method to copy the object to a new location. Then, use the DELETE method to delete the original object.

Object deletion occurs immediately at request time. Any subsequent GET, HEAD, POST, or DELETE operations return a 404 Not Found error code.

For static large object manifests, you can add the ?multipart-manifest=delete query parameter. This operation deletes the segment objects and if all deletions succeed, this operation deletes the manifest object.

Example request and response:

  • Delete the helloworld object from the marktwain container: curl -i $publicURL/marktwain/helloworld -X DELETE -H "X-Auth-Token: $token"

    HTTP/1.1 204 No Content
    Content-Length: 0
    Content-Type: text/html; charset=UTF-8
    X-Trans-Id: tx36c7606fcd1843f59167c-0052d6fdac
    Date: Wed, 15 Jan 2014 21:29:16 GMT

For a complete description of HTTP 1.1 header definitions, see Header Field Definitions.

Normally the DELETE operation does not return a response body. However, with the multipart-manifest=delete query parameter, the response body contains a list of manifest and segment objects and the status of their delete operations.

Error response codes: 400, 500,

 Request

This table shows the header parameters for the delete object request:

NameTypeDescription

X-Auth-Token

​String

(Optional)

Authentication token. If you omit this header, your request fails unless the account owner has granted you access through an access control list (ACL).

This table shows the URI parameters for the delete object request:

NameTypeDescription

{account}

​String

The unique name for the account. An account is also known as the project or tenant.

{container}

​String

The unique name for the container.

{object}

​String

The unique name for the object.

This table shows the query parameters for the delete object request:

NameTypeDescription

multipart-manifest

​String

(Optional)

If you include the multipart-manifest=delete query parameter and the object is a static large object, the segment objects and the manifest object are deleted. If you omit the multipart-manifest=delete query parameter and this is a static large object, the manifest object is deleted and the segment objects are not deleted.

For a bulk delete, the response body looks the same as it does for a normal bulk delete. In contrast, a plain object DELETE response has an empty body.

 Response

This table shows the header parameters for the delete object response:

NameTypeDescription

Content-Length

​String

(Required)

If the operation succeeds, this value is zero (0). If the operation fails, this value is the length of the error text in the response body.

Content-Type

​String

(Required)

The MIME type of the object.

X-Trans-Id

​Uuid

(Required)

A unique transaction identifier for this request. Your service provider might need this value if you report a problem.

Date

​Datetime

(Required)

The transaction date and time.

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page

loading table of contents...