# HeadObject

Returns the metadata of the object.

The method is equivalent to the [GetObject](get) 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](../common-request-headers) 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,](../common-response-headers) 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](../answers) section .
