百度智能云

All Product Document

          Object Storage

          Get Object Meta Information

          Interface Description

          This command is used to get the meta information of an object, but it does not return data at this time. Note:

          • If the soft link is used to access GetObjectMeta, Content-Length, ETag, and Content-Md5 in the return response header are the meta information of the destination file, Last-Modified is the maximum value of the destination files and soft link, and others are the meta information of the soft link.
          • If the soft link is used to access this API and the destination file is deleted, it returns “Http 404: SymlinkTargetNotExist”. No error occurs when GetSymlink is called.

          Request URI

          HEAD /v1/{bucketName}/{objectKey}

          Parameter Name Parameter Type Required Description Example Value Parameter Position
          bucketName String Yes Bucket name "bucketName_example" Path
          objectKey String Yes Object name "objectKey_example" Path

          Request Body Parameters

          Description of Data Structure for Request Body Field

          Response Header Parameters

          Parameter Name Parameter Type Description Example Value
          Cache-Control String Download the Cache setting of the Object. The common values include private, no-cache, max-age, and must-revalidate.
          Content-Disposition String Set the browser to download files. The optional values include inline, attachment; filename="download.txt".
          Content-Length String Return the data size of the object.
          Content-Range String If a range is available, it returns the data range of the object.
          Content-Type String Object type and coding method
          Expires String Cache expiration date during the object download
          ETag String HTTP protocol entity tag of the object
          x-bce-meta-* String Returns this item only when there is a custom meta.
          x-bce-storage-class String Return STANDARD for the standard storage, STANDARD_IA for the infrequent access, COLD for cold storage and ARCHIVE for the archive storage. If it is a multi-AZ bucket, it returns MAZ_STANDARD_IA for the multi-AZ infrequent access and MAZ_STANDARD for the multi-AZ standard storage.
          x-bce-server-side-encryption String Server encryption type of the object. Only the AES256 encryption is supported currently.
          x-bce-restore String When the object is of archive storage type and is being restored or has been restored, it returns the header field “x-bce-restore” to indicate the restoration status of the archive object: return ongoing-request="true" when it is being restored, return ongoing-request="false", expiry-date="Wed, 07 Nov 2019 00:00:00 GMT" when it has been restored. expiry-date indicates the expiration date after the object is restored.
          x-bce-object-type String When you access a soft link, it returns "Symlink". In other cases, it does not return any value.

          Response Body Parameters

          Description of Data Structure for Response Body Field

          Request Example

          HEAD /v1/bucketName_example/objectKey_example
          Common Request Header
          
          
          { }

          Response Example

          HTTP/1.1 200 OK
          <Common response header>
          
          { }

          Error Code

          Refer to the universal error code.

          Previous
          Get Object
          Next
          Restore Archive Files