Delete container

 
MethodURIDescription
DELETE/v1/{account}/{container}

Deletes an empty container.

This operation fails unless the container is empty. An empty container has no objects.

Delete the steven container:

curl -i $publicURL/steven -X DELETE -H "X-Auth-Token: $token"

If the container does not exist, the response is:

HTTP/1.1 404 Not Found
Content-Length: 70
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx4d728126b17b43b598bf7-0052d81e34
Date: Thu, 16 Jan 2014 18:00:20 GMT

If the container exists and the deletion succeeds, the response is:

HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txf76c375ebece4df19c84c-0052d81f14
Date: Thu, 16 Jan 2014 18:04:04 GMT

If the container exists but is not empty, the response is:

HTTP/1.1 409 Conflict
Content-Length: 95
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx7782dc6a97b94a46956b5-0052d81f6b
Date: Thu, 16 Jan 2014 18:05:31 GMT

<html><h1>Conflict</h1><p>There was a conflict when trying to complete your request.</p></html>

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

Normal response codes: 204

Error response codes: NotFound (404), Conflict (409)

 Request

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

NameTypeDescription

X-Auth-Token

​String

(Required)

Authentication token.

This table shows the URI parameters for the delete container 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.

 Response

This table shows the header parameters for the delete container 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)

If the operation fails, this value is the MIME type of the error text in the response body.

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...