Show container details and list objects
/v1/{account}/{container}
Request
-
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. 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.
-
delimiter(optional): string(char)
Delimiter value, which returns the object names that are nested in the container.
-
end_marker(optional): string
For a string value, x, returns container names that are less than the marker value.
-
format(optional): string
The response format. Valid values are
json,xml, orplain. The default isplain.If you append the
format=xmlorformat=jsonquery parameter to the storage account URL, the response shows extended container information serialized in that format.If you append the
format=plainquery parameter, the response lists the container names separated by newlines.Default Value:plainAllowed Values:[ "json", "xml", "plain" ] -
limit(optional): integer
Minimum Value:
0For an integer value n, limits the number of results to n. -
marker(optional): string
For a string value, x, returns container names that are greater than the marker value.
-
path(optional): string
For a string value, returns the object names that are nested in the pseudo path. Equivalent to setting delimiter to
/andprefixto the path with a/at the end. -
prefix(optional): string
Prefix value. Named items in the response begin with this value.
-
Accept(optional): string
Instead of using the
formatquery parameter, set this header toapplication/json,application/xml, ortext/xml. -
X-Auth-Token: string
Authentication token.
-
X-Newest(optional): boolean
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 totrueis more expensive for the back end, use it only when it is absolutely needed.
Response
- application/json
200 Response
-
Accept-Ranges: string
The type of ranges that the object accepts.
-
Content-Length: integer
Minimum Value:
0The length of the response body that contains the list of names. -
Content-Type: string
The MIME type of the list of names.
-
Date: string(date)
The transaction date and time.
The date and time stamp format is ISO 8601:
CCYY-MM-DDThh:mm:ss±hh:mm
For example,2015-08-27T09:49:58-05:00.The
±hh:mmvalue, if included, is the time zone as an offset from UTC. In the previous example, the offset value is-05:00.A
nullvalue indicates that the token never expires. -
X-Container-Bytes-Used: integer
Minimum Value:
0The count of bytes used in total. -
X-Container-Meta-Access-Control-Allow-Origin: string
(Optional) List of origins to be allowed to make cross-origin Requests. Entries in the list are space-separated.
-
X-Container-Meta-Access-Control-Expose-Headers: string
(Optional) List of headers exposed to the user agent (e.g. browser) in the actual request response. Entries in the list are space-separated.
-
X-Container-Meta-Access-Control-Max-Age: integer
Minimum Value:
0(Optional) Maximum age in seconds for the origin to hold the preflight results. -
X-Container-Meta-Temp-URL-Key: string
(Optional) The secret key value for temporary URLs.
-
X-Container-Meta-Temp-URL-Key-2: string
(Optional) A second secret key value for temporary URLs. The second key enables you to rotate keys by having two active keys at the same time.
-
X-Container-Meta-{name}: string
The custom container metadata item, where
{name}is the name of the metadata item. OneX-Container-Meta-{name}response header appears for each metadata item (for each{name}). -
X-Container-Object-Count: integer
Minimum Value:
0The number of objects. -
X-Timestamp: integer(timestamp)
Minimum Value:
0The date and time in UNIX Epoch time stamp format when the account, container, or object was initially created as a current version.For example,
1440619048is equivalent toMon, Wed, 26 Aug 2015 19:57:28 GMT. -
X-Trans-Id: string(uuid)
A unique transaction identifier for this request. Your service provider might need this value if you report a problem.
-
X-Worm-Expiration-Days: integer
Minimum Value:
0Minimum Value:> true(Optional) The number of days that an uploaded object must exist until it can be deleted.
object-
bytes(optional):
integer
Minimum Value:
0The total number of bytes that are stored in Object Storage for the account. -
content-type(optional):
string
The content type of the object.
-
hash(optional):
string
The MD5 checksum value of the object content.
-
last_modified(optional):
string(date)
The date and time when the object was last modified.
The date and time stamp format is ISO 8601:
CCYY-MM-DDThh:mm:ss±hh:mm
For example,2015-08-27T09:49:58-05:00.The
±hh:mmvalue, if included, is the time zone as an offset from UTC. In the previous example, the offset value is-05:00. -
name(optional):
string
The name of the container.
204 Response
marker, limit, or end_marker query parameter and you have reached the end of the list.-
Accept-Ranges: string
The type of ranges that the object accepts.
-
Content-Length: integer
Minimum Value:
0The length of the response body that contains the list of names. -
Content-Type: string
The MIME type of the list of names.
-
Date: string(date)
The transaction date and time.
The date and time stamp format is ISO 8601:
CCYY-MM-DDThh:mm:ss±hh:mm
For example,2015-08-27T09:49:58-05:00.The
±hh:mmvalue, if included, is the time zone as an offset from UTC. In the previous example, the offset value is-05:00.A
nullvalue indicates that the token never expires. -
X-Container-Bytes-Used: integer
Minimum Value:
0The count of bytes used in total. -
X-Container-Meta-Access-Control-Allow-Origin: string
(Optional) List of origins to be allowed to make cross-origin Requests. Entries in the list are space-separated.
-
X-Container-Meta-Access-Control-Expose-Headers: string
(Optional) List of headers exposed to the user agent (e.g. browser) in the actual request response. Entries in the list are space-separated.
-
X-Container-Meta-Access-Control-Max-Age: integer
Minimum Value:
0(Optional) Maximum age in seconds for the origin to hold the preflight results. -
X-Container-Meta-Temp-URL-Key: string
(Optional) The secret key value for temporary URLs.
-
X-Container-Meta-Temp-URL-Key-2: string
(Optional) A second secret key value for temporary URLs. The second key enables you to rotate keys by having two active keys at the same time.
-
X-Container-Meta-{name}: string
The custom container metadata item, where
{name}is the name of the metadata item. OneX-Container-Meta-{name}response header appears for each metadata item (for each{name}). -
X-Container-Object-Count: integer
Minimum Value:
0The number of objects. -
X-Timestamp: integer(timestamp)
Minimum Value:
0The date and time in UNIX Epoch time stamp format when the account, container, or object was initially created as a current version.For example,
1440619048is equivalent toMon, Wed, 26 Aug 2015 19:57:28 GMT. -
X-Trans-Id: string(uuid)
A unique transaction identifier for this request. Your service provider might need this value if you report a problem.
-
X-Worm-Expiration-Days: integer
Minimum Value:
0Minimum Value:> true(Optional) The number of days that an uploaded object must exist until it can be deleted.
401 Response
-
Content-Length: integer
Minimum Value:
0The length of the error text in the response body. -
Content-Type: string
The MIME type of the error text in the response body.
403 Response
- 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.
-
Content-Length: integer
Minimum Value:
0The length of the error text in the response body. -
Content-Type: string
The MIME type of the error text in the response body.
404 Response
-
Content-Length: integer
Minimum Value:
0The length of the error text in the response body. -
Content-Type: string
The MIME type of the error text in the response body.
416 Response
- Fifty ranges
- Three overlapping ranges
- Eight non-increasing ranges
-
Content-Length: integer
Minimum Value:
0The length of the error text in the response body. -
Content-Type: string
The MIME type of the error text in the response body.
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