Cloud Enterprise Object Storage REST API

Search (SHIFT+S)




Create Container

PUT /v1/{account}/{container}

Creates a Swift container (keypool) within account (namespace).

Containers are storage compartments for your data. Containers can be assigned custom metadata by including additional HTTP headers, identified with the X-Container-Meta-prefix, on the PUT request.

To use the OpenStack Swift REST API, you must obtain an authorization token, which you pass to each request in the X-Auth-Token header.

X-Emc-Vpool is the ID of the replication group to associate with the new container. This determines the data stores that are used to store the objects associated with this container. If this header is not present, the default replication group defined on the namespace is used.

Rules For Bucket Naming

The only restrictions on container names is that they cannot contain a forward slash (/) or an ascii null (%00) and must be less than 257 bytes in length.

Please note that the length restriction applies to the name after it has been URL encoded. For example, a container name of Course Docs would be URL encoded as Course%20Docs and therefore be 13 bytes in length rather than the expected 11.

URL Format

v1/{account}/{container}

Request Headers

X-Auth-Token optionalAuthorization token to be passed in all the headers
X-Container-Read optionalGroups that are assigned READ rights to container
X-Container-Write optionalGroups that are assigned WRITE rights to container
X-Container-Meta-prefix optionalCustom metadata is assigned to a container via HTTP headers identified with the X-Container-Meta-prefix.
x-emc-dataservice-vpool optionalID of the Replication Group to be associated with this newly created container
X-Versions-Location optionalContainer to hold old versions
x-emc-retention-period optionalImplicitly applying retention period in seconds for all objects in container, -1 denotes infinity
x-emc-file-system-access-enabled optionalFlag that indicates whether the bucket can be accessed as HDFS
x-emc-is-stale-allowed optionalContainer Flag that indicates whether the bucket can be accessed during a temporary VDC outage in a federated configuration

Prerequisites

The following conditions must be met in order to call this operation.

  • The user must exist and have the Swift "admin" role to create a container.


Request Payload

No Request Payload


Response Body

Response indicating the status of the create operation