Get Meta Information of an Object
Updated at:2025-11-03
API description
This command is used to retrieve the Metadata of an object, but no data is returned at this time. Note:
- For GetObjectMeta access using a symlink, the Content-Length, ETag, and Content-MD5 in the response headers reflect the target file's metadata. Last-Modified is the maximum value between the target file and the symlink, while other metadata corresponds to the symlink itself.
- If this API is accessed via a symlink and the target file is deleted, an HTTP 404 error with SymlinkTargetNotExist will be returned. However, the GetSymlink callback will not indicate an error.
Request URI
HEAD /v1/{bucketName}/{objectKey}
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
| objectKey | String | Yes | Object name | "objectKey_example" | Path |
Parameters of request body
Description of the data structure of request body fields
Response header parameters
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| Cache-Control | String | Cache settings for downloading the object. Common values include private, no-cache, max-age, must-revalidate | |
| Content-Disposition | String | Set whether the browser downloads the file; available values are inline, attachment; filename="download.txt" | |
| Content-Length | String | Size of data returned to the object | |
| Content-Range | String | Range of data returned to the object when the range is set up | |
| Content-Type | String | Object type and encoding method | |
| Expires | String | Cache expiration time when the object is downloaded | |
| ETag | String | The HTTP protocol entity tag of object | |
| x-bce-meta-* | String | This item is returned only if custom meta exists | |
| x-bce-storage-class | String | STANDARD is returned for standard storage, STANDARD_IA for infrequent access storage, COLD for cold storage, and ARCHIVE for archive storage. For multi-AZ class buckets, MAZ_STANDARD_IA is returned for multi-AZ infrequent access storage and MAZ_STANDARD for multi-AZ standard storage. | |
| x-bce-server-side-encryption | String | Currently, the only supported server-side encryption type for objects is AES256. | |
| x-bce-restore | String | If an object is stored in the archive storage class and is being or has been restored, the header "x-bce-restore" will be returned, indicating the restoration status: ongoing-request="true" if it's being restored, or ongoing-request="false", expiry-date="Wed, 07 Nov 2019 00:00:00 GMT" if restoration is complete. The expiry-date specifies the expiration time after the object's restoration. | |
| x-bce-object-type | String | For access via symlink, the response will return "symlink." In other cases, no data is returned. |
Response body parameters
Description of the data structure of response body fields
Request example
JSON
1HEAD /v1/bucketName_example/objectKey_example
2 <Common request headers>
3{ }
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{ }
Error code
Please refer to the general error codes
