Show account metadata

 
MethodURIDescription
HEAD/v1/{account}

Shows metadata for a specified account.

Metadata for the account includes:

  • Number of containers

  • Number of objects

  • Total number of bytes that are stored in Object Storage for the account

Because the storage system can store large amounts of data, take care when you represent the total bytes response as an integer; when possible, convert it to a 64-bit unsigned integer if your platform supports that primitive type.

This operation does not accept a request body.

Do not include metadata headers in this request.

Show account metadata request:

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

HTTP/1.1 204 No Content
Content-Length: 0
X-Account-Object-Count: 1
X-Account-Meta-Book: MobyDick
X-Timestamp: 1389453423.35964
X-Account-Bytes-Used: 14
X-Account-Container-Count: 2
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
X-Trans-Id: txafb3504870144b8ca40f7-0052d955d4
Date: Fri, 17 Jan 2014 16:09:56 GMT

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

If the account or authentication token is not valid, the operation returns the 401 Unauthorized error code.

Normal response codes: 204

Error response codes: unauthorized (401)

 Request

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

NameTypeDescription

X-Auth-Token

​String

(Required)

Authentication token.

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 account metadata request:

NameTypeDescription

{account}

​String

The unique name for the account. An account is also known as the project or tenant.

 Response

This table shows the header parameters for the show account metadata response:

NameTypeDescription

X-Account-Object-Count

​Int

(Required)

The number of objects in the account.

X-Account-Container-Count

​Int

(Required)

The number of containers.

X-Account-Bytes-Used

​Int

(Required)

The total number of bytes that are stored in Object Storage for the account.

X-Account-Meta-name

​String

(Optional)

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

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

X-Account-Meta-Temp-URL-Key

​String

(Optional)

The secret key value for temporary URLs. If not set, this header is not returned by this operation.

X-Account-Meta-Temp-URL-Key-2

​String

(Optional)

A second secret key value for temporary URLs. If not set, this header is not returned by this operation.

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.

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