GetObjectMeta
Updated at:2025-11-03
API description
This command retrieves the Metadata of an object. Note that no object data is returned.
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
-
Request syntax
Plain Text1HEAD /<ObjectName> HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> -
Multi-version request syntax
Plain Text1HEAD /<ObjectName>?versionId=<VersionId> HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <Date> 4Authorization: <AuthorizationString> -
Request headers
No special header parameters
| Field | Types | Whether required | Description |
|---|---|---|---|
| versionId | String | No | Retrieve the version ID of the object. By default, the latest version is returned. If specified as "null," the null version's information will be retrieved. |
Response
| Name | Types | Description |
|---|---|---|
| Cache-Control | String | Cache settings for downloading the Object. Common values include private, no-cache, max-age and must-revalidate |
| Content-Disposition | String | Set whether to download the browser. Options: inline, attachment; filename="download.txt" |
| Content-Length | Long Int | 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 | Return STANDARD for standard storage, STANDARD_IA for infrequent access storage, COLD for cold storage, and ARCHIVE for archive storage; if it is multi-AZ bucket, return MAZ_STANDARD_IA for multi-AZ infrequent access storage, and MAZ_STANDARD for multi-AZ standard storage. |
| x-bce-server-side-encryption | String | The server-side encryption type for the object supports AES256 and SM4 encryption. |
| x-bce-restore | String | When the object is subject to archive storage class and is being or has been restored, the header "x-bce-restore" will be returned, indicating the restoration status of the archive storage class object: return ongoing-request="true" when it is being restored; return ongoing-request="false", expiry-date="Wed, 07 Nov 2019 00:00:00 GMT" if the archive storage class object has been restored. Where, expiry-date represents the expiration time after the object is restored. |
| x-bce-object-type | String | For access via symlink, the response will return "symlink." In other cases, no data is returned. |
| x-bce-version-id | String | Version ID of object. |
None
Note
None
Example
-
Request example
Plain Text1HEAD /ObjectName HTTP/1.1 2Host: BucketName.bj.bcebos.com 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Authorization: AuthorizationString -
Response example
Plain Text1HTTP/1.1 200 OK 2x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 3x-bce-storage-class: STANDARD 4Date: Wed, 06 Apr 2016 06:34:40 GMT 5Last-Modified: Sun, 1 Jan 2006 12:00:00 GMT 6ETag: "fba9dede5f27731c9771645a39863328" 7Content-Length: 0 8Content-Type: text/plain 9Connection: close 10Server: BceBos -
Response example when an archive storage class object has been restored
Plain Text1HTTP/1.1 200 OK 2x-bce-request-id: 4db2b34d-654d-4d8a-b49b-3049ca786409 3x-bce-storage-class: ARCHIVE 4x-bce-restore: ongoing-request="false", expiry-date="Wed, 07 Nov 2019 00:00:00 GMT" 5Date: Wed, 27 Feb 2019 06:34:40 GMT 6Last-Modified: Wed, 20 Feb 2019 06:34:40 GMT 7ETag: "fba9dede5f27731c9771645a39863328" 8Content-Length: 15618 9Content-Type: text/plain 10Connection: close 11Server: BceBos -
Multi-version request example
Plain Text1HEAD /ObjectName?versionId=ADCQMlGFiNo%3D HTTP/1.1 2Host: BucketName.bj.bcebos.com 3Date: Wed, 06 Apr 2016 06:34:40 GMT 4Authorization: AuthorizationString -
Response example
Plain Text1HTTP/1.1 200 OK 2x-bce-request-id: 4db2b34d-654d-4ddd-b49b-3049ca786409 3x-bce-storage-class: STANDARD 4Date: Wed, 06 Apr 2016 06:34:40 GMT 5Last-Modified: Sun, 1 Jan 2022 12:01:00 GMT 6ETag: "fba9dede5f27731c9771645a39863328" 7Content-Length: 0 8Content-Type: text/plain 9Connection: close 10Server: BceBos 11x-bce-version-id:ADCQMlGFiNo=
