Show container metadata

 
MethodURIDescription
HEAD/v1/{account}/{container}

Shows container metadata, including the number of objects and the total bytes of all objects stored in the container.

Show container metadata request:

curl -i $publicURL/marktwain -X HEAD -H "X-Auth-Token: $token"

HTTP/1.1 204 No Content
Content-Length: 0
X-Container-Object-Count: 1
Accept-Ranges: bytes
X-Container-Meta-Book: TomSawyer
X-Timestamp: 1389727543.65372
X-Container-Meta-Author: SamuelClemens
X-Container-Bytes-Used: 14
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx0287b982a268461b9ec14-0052d826e2
Date: Thu, 16 Jan 2014 18:37:22 GMT

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

If the request succeeds, the operation returns the 204 status code.

Normal response codes: 204

 Request

This table shows the header parameters for the show container metadata request:

NameTypeDescription

X-Auth-Token

​String

(Optional)

Authentication token. If you omit this header, your request fails unless the account owner has granted you access through an access control list (ACL).

X-Newest

​Boolean

(Optional)

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.

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

X-Container-Object-Count

​Int

(Required)

The number of objects.

Accept-Ranges

​String

(Required)

The type of ranges that the object accepts.

X-Container-Meta-name

​String

(Required)

The custom container metadata item, where {name} is the name of the metadata item.

One X-Container-Meta-{name} response header appears for each metadata item (for each {name}).

X-Container-Bytes-Used

​Int

(Required)

The count of bytes used in total.

X-Container-Read

​String

(Optional)

The ACL that grants read access. If not set, this header is not returned by this operation.

X-Container-Write

​String

(Optional)

The ACL that grants write access. If not set, this header is not returned by this operation.

X-Container-Sync-To

​String

(Optional)

The destination for container synchronization. If not set, this header is not returned by this operation.

X-Container-Sync-Key

​String

(Optional)

The secret key for container synchronization. If not set, this header is not returned by this operation.

X-Versions-Location

​String

(Required)

Enables versioning on this container. The value is the name of another container. You must UTF-8-encode and then URL-encode the name before you include it in the header. To disable versioning, set the header to an empty string.

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