# HeadObject

Returns the metadata of the object.

The method is equivalent to the [GetObject](/http-api-compatible-with-amazon-s3/api-reference/object/get.md) method , but the object itself is missing from the response.

### Request <a href="#request" id="request"></a>

```
HEAD /{bucket}/{key} HTTP/1.1
```

#### Path parameters <a href="#path-parameters" id="path-parameters"></a>

| Parameter | Description  |
| --------- | ------------ |
| `bucket`  | Bucket name. |
| `key`     | Object key.  |

#### Headings <a href="#request-headers" id="request-headers"></a>

Use the required [common headers](/http-api-compatible-with-amazon-s3/api-reference/common-request-headers.md) in the request .

You can also use the following headers in the request:

| Heading               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Range`               | <p>Specifies the range of bytes to load from the object.<br><br>Read more about the Range header in the HTTP specification <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35"><http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35></a> .</p>                                                                                                                                                                                                                                                                       |
| `If-Modified-Since`   | <p>If specified, ColdStack returns:<br>- Object. If it changed after the specified time.<br>- Code 304. If the object has not changed after the specified time.<br><br>If the query at the same time there are headers <code>If-Modified-Since</code>and <code>If-None-Match</code>and check it settled like <code>If-Modified-Since -> true</code>and <code>If-None-Match -> false</code>then ColdStack returns the code 304. For details, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a> .</p>                                       |
| `If-Unmodified-Since` | <p>If specified, ColdStack returns:<br>- Object. If it hasn't changed since the specified time.<br>- Code 412. If the object has not changed since the specified time.<br><br>If the request headers are present simultaneously <code>If-Unmodified-Since</code>and <code>If-Match</code>resolved as checks on them <code>If-Unmodified-Since -> false</code>, and <code>If-Match -> true</code>then ColdStack returns a code 200, and the requested data. See <a href="https://tools.ietf.org/html/rfc7232">RFC 7232 for</a> details .</p>            |
| `If-Match`            | <p>If specified, ColdStack returns:<br><br>- Object. If it <code>ETag</code>matches the one passed.<br>- Code 412. If it <code>ETag</code>does not match the transmitted one.<br><br><br>If the request headers are present simultaneously <code>If-Unmodified-Since</code>and <code>If-Match</code>resolved as checks on them <code>If-Unmodified-Since -> false</code>, and <code>If-Match -> true</code>then ColdStack returns a code 200, and the requested data. See <a href="https://tools.ietf.org/html/rfc7232">RFC 7232 for</a> details .</p> |
| `If-None-Match`       | <p>If specified, ColdStack returns:<br><br>- Object. If its <code>ETag</code>not the same as the one passed.<br>- Code 304. If it <code>ETag</code>matches the transmitted one.<br><br><br>If the query at the same time there are headers <code>If-Modified-Since</code>and <code>If-None-Match</code>and check it settled like <code>If-Modified-Since -> true</code>and <code>If-None-Match -> false</code>then ColdStack returns the code 304. For details, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a> .</p>                   |

### Answer <a href="#response" id="response"></a>

#### Headings <a href="#response-headers" id="response-headers"></a>

In addition to the [general headers,](/http-api-compatible-with-amazon-s3/api-reference/common-response-headers.md) you can see the headers listed in the table below in the response.

| Heading                                       | Description                                                                                                                                                                    |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `x-amz-meta-*`                                | The custom metadata of the object, saved with the object.                                                                                                                      |
| `x-amz-storage-class`                         | <p>Object storage class.<br>Matters <code>COLD</code>if the object is in Cold Storage.<br><br>If the object is saved in the Standard storage, then there will be no title.</p> |
| `x-amz-server-side-encryption`                | The encryption algorithm used to encrypt the object. Returned if the object was loaded with encryption enabled .                                                               |
| `x-amz-server-side-encryption-aws-kms-key-id` | KMS key identifier . Returned if the object was loaded with encryption enabled .                                                                                               |

#### Answer codes <a href="#response-codes" id="response-codes"></a>

For a list of possible answers, see the [Answers](/http-api-compatible-with-amazon-s3/api-reference/answers.md) section .


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coldstack.io/http-api-compatible-with-amazon-s3/api-reference/object/getobjectmeta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
