Show object metadata

 
MethodURIDescription
HEAD/v1/{account}/{container}/{object}​{?signature,​expires}

Shows object metadata.

If the Content-Length response header is non-zero, the example cURL command stalls after it prints the response headers because it is waiting for a response body. However, the Object Storage system does not return a response body for the HEAD operation.

Example requests and responses:

  • Show object metadata:

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

    HTTP/1.1 200 OK
    Content-Length: 14
    Accept-Ranges: bytes
    Last-Modified: Thu, 16 Jan 2014 21:12:31 GMT
    Etag: 451e372e48e0f6b1114fa0724aa79fa1
    X-Timestamp: 1389906751.73463
    X-Object-Meta-Book: GoodbyeColumbus
    Content-Type: application/octet-stream
    X-Trans-Id: tx37ea34dcd1ed48ca9bc7d-0052d84b6f
    Date: Thu, 16 Jan 2014 21:13:19 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 object 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 object 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.

{object}

​String

The unique name for the object.

This table shows the query parameters for the show object metadata request:

NameTypeDescription

signature

​String

(Optional)

Used with temporary URLs to sign the request. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference .

expires

​String

(Optional)

Used with temporary URLs to specify the expiry time of the signature. For more information about temporary URLs, see OpenStack Object Storage API v1 Reference .

 Response

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

NameTypeDescription

Last-Modified

​String

(Required)

The date and time that the object was created or the last time that the metadata was changed.

Content-Length

​String

(Required)

The length of the object content in the response body, in bytes.

Content-Length

​String

(Required)

HEAD operations do not return content. However, in this operation the value in the Content-Length header is not the size of the response body. Instead it contains the size of the object, in bytes.

Content-Type

​String

(Required)

The MIME type of the object.

ETag

​String

(Required)

For objects smaller than 5 GB, this value is the MD5 checksum of the object content. The value is not quoted.

For manifest objects, this value is the MD5 checksum of the concatenated string of MD5 checksums and ETags for each of the segments in the manifest, and not the MD5 checksum of the content that was downloaded. Also the value is enclosed in double-quote characters.

You are strongly recommended to compute the MD5 checksum of the response body as it is received and compare this value with the one in the ETag header. If they differ, the content was corrupted, so retry the operation.

Content-Encoding

​String

(Optional)

If set, the value of the Content-Encoding metadata.

If not set, this header is not returned by this operation.

Content-Disposition

​String

(Optional)

If set, specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default.

If not set, this header is not returned by this operation.

X-Delete-At

​String

(Optional)

If set, the time when the object will be deleted by the system in the format of a UNIX Epoch timestamp.

If not set, this header is not returned by this operation.

X-Object-Manifest

​String

(Optional)

If set, to this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix.

X-Object-Meta-name

​String

(Required)

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

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

X-Static-Large-Object

​Bool

(Required)

Set to True if this object is a static large object manifest object.

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