GetObjectMeta method
Returns object metadata.
The method is equivalent to get, but the object itself is not included in the response.
For more information on getting started with the API and the general request format, see How to use the S3 API.
Request
HEAD /{bucket}/{key} HTTP/2
Path parameters
Parameter | Description |
---|---|
bucket |
Bucket name. |
key |
Object key. |
Headers
Use the appropriate common headers in your request.
You can also use the following headers in your request:
Header | Description |
---|---|
Range |
It defines the range of bytes to load from the object. For more information about the Range header, see the HTTP specification http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 |
If-Modified-Since |
If specified, Object Storage returns the following: - Object. If it has been modified since the specified time. - Code 304. If the object has not been modified since the specified time. If a request has both the If-Modified-Since and If-None-Match headers and their checks result in If-Modified-Since -> true and If-None-Match -> false , Object Storage returns the 304 code. For more information, see RFC 7232 |
If-Unmodified-Since |
If specified, Object Storage returns the following: - Object. If it has not been modified since the specified time. - Code 412. If the object has not been modified since the specified time. If a request has both the If-Unmodified-Since and If-Match headers and their checks result in If-Unmodified-Since -> false and If-Match -> true , Object Storage returns the 200 code and the requested data. For more information, see RFC 7232 |
If-Match |
If specified, Object Storage returns the following: - Object. If its ETag is the same as the provided one.- Code 412. If its ETag is different from the provided one.If a request has both the If-Unmodified-Since and If-Match headers and their checks result in If-Unmodified-Since -> false and If-Match -> true , Object Storage returns the 200 code and the requested data. For more information, see RFC 7232 |
If-None-Match |
If specified, Object Storage returns the following: - Object. If its ETag is different from the provided one.- Code 304. If its ETag is the same as the provided one.If a request has both the If-Modified-Since and If-None-Match headers and their checks result in If-Modified-Since -> true and If-None-Match -> false , Object Storage returns the 304 code. For more information, see RFC 7232 |
Response
Headers
In addition to common response headers, you can see in a response the headers listed in the table below.
Header | Description |
---|---|
X-Amz-Meta-* |
User-defined object metadata. |
X-Amz-Storage-Class |
Object storage class. It takes either the COLD or ICE value if the object is in cold or ice storage, respectively.If the object is in standard storage, there is no header. |
X-Amz-Server-Side-Encryption |
Encryption algorithm used to encrypt the object. Returned if the object was loaded with enabled encryption. |
X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id |
KMS key ID. Returned if the object was loaded with enabled encryption. |
X-Amz-Object-Lock-Mode |
Type of object lock with retention used for the object (if the bucket is versioned and object lock is enabled in it):
For an object version, you can use only retention (the |
X-Amz-Object-Lock-Retain-Until-Date |
Date and time of end of retention in any format described in the HTTP standardMon, 12 Dec 2022 09:00:00 GMT . Specify it only with the X-Amz-Object-Lock-Mode header. |
X-Amz-Object-Lock-Legal-Hold |
Type of legal hold put on the object (if the bucket is versioned and object lock is enabled in it):
For an object version, you can use only retention (the |
Response codes
For a list of possible responses, see Responses.