Show container details and list objects

get

/v1/{account}/{container}

Shows details for a container and lists objects, sorted by name, in the container.

Request

Path Parameters
  • The unique name for the account. An account is also known as the project or tenant.
  • The unique name for the container. The container name must be from 1 to 256 characters long and can start with any character and contain any pattern. Character set must be UTF-8. The container name cannot contain a slash (/) character because this character delimits the container and object name. For example, /account/container/object.
Query Parameters
  • Delimiter value, which returns the object names that are nested in the container.
  • For a string value, x, returns container names that are less than the marker value.
  • The response format. Valid values are json, xml, or plain. The default is plain.

    If you append the format=xml or format=json query parameter to the storage account URL, the response shows extended container information serialized in that format.

    If you append the format=plain query parameter, the response lists the container names separated by newlines.

    Default Value: plain
    Allowed Values: [ "json", "xml", "plain" ]
  • Minimum Value: 0
    For an integer value n, limits the number of results to n.
  • For a string value, x, returns container names that are greater than the marker value.
  • For a string value, returns the object names that are nested in the pseudo path. Equivalent to setting delimiter to / and prefix to the path with a / at the end.
  • Prefix value. Named items in the response begin with this value.
Header Parameters
  • Instead of using the format query parameter, set this header to application/json, application/xml, or text/xml.
  • Authentication token.
  • If set to true, Object Storage queries all replicas to return the most recent one. If you omit this header, Object Storage responds faster after it finds one valid replica. Because setting this header to true is more expensive for the back end, use it only when it is absolutely needed.
Back to Top

Response

Supported Media Types

200 Response

Success. The response body lists the objects.
Headers
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : items
Type: object
Show Source

204 Response

Success. The response body shows no objects. Either the container has no objects or you are paging through a long list of names by using the marker, limit, or end_marker query parameter and you have reached the end of the list.
Headers

401 Response

Request does not include an authentication token, or authentication token specified in the request is not valid. It may have expired. Authentication tokens expire after 30 minutes.
Headers

403 Response

Forbidden. Possible causes:
  • A data center has not been selected for your service in Oracle Cloud My Services.
  • The request was sent to an incorrect data center. For example, the data center for your service is Chicago (us2), but the request was sent to the URL corresponding to the Ashburn (us6) data center.
  • You don't have the required permission to perform the operation on the specified container. For example, there may be a change in the roles assigned to your user or the access privileges defined for the container specified in the request.
  • The specified operation is not permitted for archive objects or containers with storage class Archive
  • Violating a container or object level WORM policy by trying to PUT, POST, or DELETE an object that has not expired or trying to update an existing container level WORM policy.
Headers

404 Response

The container does not exist or has just been created and hasn't been replicated across all three nodes.
Headers

416 Response

Returned for any ranged GET requests that specify more than:
  • Fifty ranges
  • Three overlapping ranges
  • Eight non-increasing ranges
Headers
Back to Top

Examples

cURL Command

The following example shows how to retrieve the details for a container (and the objects in the container) in your account in Oracle Cloud Infrastructure Object Storage Classic by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -v -X GET \
     -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \
     https://foo.storage.oraclecloud.com/v1/myservice-bar/FirstContainer

Sample Response

The following is a sample response of this command:

HTTP/1.1 200 OK
X-Container-Object-Count: 5
X-Container-Write: myDomain.myservice.Storage_ReadWriteGroup
Accept-Ranges: bytes
X-Timestamp: 1434368768.60255
X-Container-Read: myDomain.myservice.Storage_ReadOnlyGroup,myDomain.myservice.Storage_ReadWriteGroup
X-Container-Bytes-Used: 325079334
X-Trans-Id: tx9b1fba66533046df9b11e-0056c582faga
Date: Thu, 18 Feb 2016 08:38:18 GMT
X-Storage-Class: Standard
X-Container-Meta-Policy-Georeplication: us2
X-Last-Modified-Timestamp: 1450251526.69885
Content-Type: text/plain;charset=utf-8
Content-Length: 235
newobj-aa
newobj-ab
newobj-ac
newobj-ad
newobj-ae
Back to Top