Querying Metadata of Objects

Last Updated At: 2025-10-21 09:10:00

Description

The HEAD Object API request allows fetching meta-information data for the corresponding object. The permissions for HEAD are the same as those for GET.

Request

Request sample:

HEAD /<ObjectKey> HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: GMT Date
Authorization: Auth String

Note:

Authorization: Auth String (For details, please refer to the Request Signature document).

Request Header

Common Headers

This request uses common request headers. For details, see Common Request Headers.

Non-common Headers

Name Type Required Description
If-Modified-Since string No If the object has been modified after the specified time, the meta-information of the corresponding object is returned; otherwise, a 304 response is returned.

Request Body

The request does not have a request body.

Response

Response Headers

Common Response Headers

This response uses common response headers. For details, see Common Response Headers.

Special Response Headers

Response headers for this request operation are as follows:

Name Type Description
x-cos-meta- * string User-defined metadata

Response Body

The response body is empty.

Practical Case

Request

HEAD /exampleobject HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: Thu, 12 Jan 2017 17:26:53 GMT
Authorization: q-sign-algorithm=sha1&q-ak=AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&q-sign-time=1484213210;32557109210&q-key-time=1484213210;32557109210&q-header-list=host&q-url-param-list=&q-signature=ac61b8eb61964e7e6b935e89de163a479a25c210

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 16087
Connection: keep-alive
Date: Thu, 12 Jan 2017 17:26:53 GMT
ETag: \"9a4802d5c99dafe1c04da0a8e7e166bf\"
Last-Modified: Wed, 11 Jan 2017 07:30:07 GMT
x-cos-request-id: NTg3NzRiZGRfYmRjMzVfM2Y2OF81N2YzNA==