Get Object Meta

Last Updated: Mar 21, 2017

Get Object Meta is used to obtain the basic meta information of an object in a bucket, but it does not return the content. The meta information includes the Etag, Size (the file size), and LastModified.

Request syntax

  1. GET /ObjectName?objectMeta HTTP/1.1
  2. Host: BucketName.oss-cn-hangzhou.aliyuncs.com
  3. Date: GMT Date
  4. Authorization: SignatureValue

Detail analysis

  • After the Get Object Meta request is sent, no message body is returned no matter whether the system returns the OK message or an error message.
  • Get Object Meta needs to contain the parameters of the ObjectMeta request; otherwise, it indicates a Get Object request.
  • If the file does not exist, the system will return the 404 Not Found error.
  • Get Object Meta is more lightweight than Header Object. Only some basic meta information of an object in a bucket is returned. The meta information includes the Etag, Size (the file size), and LastModified. The Size is measured with the value of the Content-Length header.
  • If the file type is symbolic link, only the information of the symbolic link itself will be returned.

Example

Request example:

  1. GET /oss.jpg?objectMeta HTTP/1.1
  2. Host: oss-example.oss-cn-hangzhou.aliyuncs.com
  3. Date: Wed, 29 Apr 2015 05:21:12 GMT
  4. Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:CTkuxpLAi4XZ+WwIfNm0FmgbrQ0=

Return example

  1. HTTP/1.1 200 OK
  2. x-oss-request-id: 559CC9BDC755F95A64485981
  3. Date: Wed, 29 Apr 2015 05:21:12 GMT
  4. ETag: "5B3C1A2E053D763E1B002CC607C5A0FE"
  5. Last-Modified: Fri, 24 Feb 2012 06:07:48 GMT
  6. Content-Length: 344606
  7. Connection: keep-alive
  8. Server: AliyunOSS
Thank you! We've received your feedback.