Creating Containers

A container is a storage compartment that provides a way to organize the data stored in Oracle Storage Cloud Service.

Any user with the Service Administrator role can create containers. You should create at least one container for your account. Containers are similar to a directory structure but with a key distinction: unlike directories, containers cannot be nested. By default, all containers are standard.

For information about creating containers by using the Java library, see createContainer in Java API Reference for Oracle Cloud Storage Service.

For information about creating containers by using the REST API, see:

To create an archive container, you must set the X-Storage-Class header to Archive. For more information, see Creating Archive Containers.

cURL Command Syntax

curl -v -X PUT \
     -H "X-Auth-Token: token" \

HTTP Response Codes

cURL Command Example

curl -v -X PUT \
     -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \


The URL of the account in this example is Replace this URL with the URL for your account. For the steps to find out your account URL, see URL for the Account.

The following is an example of the output of this command:

* About to connect() to port 443 (#0)
*   Trying connected
* Connected to ( port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Oct 22 00:00:00 2014 GMT
*       expire date: Dec 21 23:59:59 2015 GMT
*       common name: *
*       issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
> PUT /v1/Storage-myIdentityDomain/FirstContainer HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/ zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host:
> Accept: */*
> X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b
< HTTP/1.1 201 Created
< Date: Fri, 06 Mar 2015 10:34:20 GMT
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx23a1084b8c674fdeae8d4-0054f982ac
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Language: en
* Connection #0 to host left intact
* Closing connection #0

For information about getting details of a container, see Getting Container Metadata.