• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Objects
  5. HEAD Object
  6. Examples

Examples

Sample Request

HEAD /test HTTP/1.1 
 User-Agent: Jakarta Commons-HttpClient/3.1 
 Host: bucketname.obs.example.com 
 Accept: */*
 Date: Sat, 03 Dec 2011 09:17:57 +0000 
 Authorization: AWS BF6C09F302931425E9A7:++6NkzwVhw4qccNfIqf4G2vMggg=

Sample Response

HTTP/1.1 200 OK  
 Server: OBS 
 x-amz-request-id: 001B21A61C6C0000013403373811529D 
 x-amz-id-2: MDAxQjIxQTYxQzZDMDAwMDAxMzQwMzM3MzgxMTUyOURBQUFBQUFBQWJiYmJiYmJi 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
 Accept-Ranges: bytes
 ETag: "507e3fff69b69bf57d303e807448560b" 
 Last-Modified: Sat, 03 Dec 2011 08:47:50 GMT 
 Content-Length: 30 
 Content-Type: binary/octet-stream 
 Date: Sat, 03 Dec 2011 09:17:57 GMT  

Sample Request (Getting the Metadata of an Object with Version ID Specified)

HEAD /object?versionId=AAABQ4-glIvc0vycq3gAAAAVVURTRkha HTTP/1.1 
 User-Agent: Jakarta Commons-HttpClient/3.1 
 Host: bucketname.obs.example.com 
 Accept: */* 
 Date: Tue, 14 Jan 2014 07:22:17 +0000 
 Authorization: AWS C9590CEB8EC051BDEC9D:CTunmEJMuOBqUa4zfJNz6zxkjBE=

Sample Response (Getting the Metadata of an Object with Version ID Specified)

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: DCD2FC9CAB78000001438FA11E6CBB07 
 x-amz-id-2: SSfKQyh2Gr6ygerqHhJLZ6rxPiv+ucjWabr48RssNJMWmGyKh9gDdXC0jvo1JmFs 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
 Accept-Ranges: bytes 
 ETag: "ba1f2511fc30423bdbb183fe33f3dd0f" 
 Last-Modified: Tue, 14 Jan 2014 07:21:42 GMT 
 Content-Length: 4 
 x-amz-version-id: AAABQ4-glIvc0vycq3gAAAAVVURTRkha 
 Content-Type: binary/octet-stream 
 Date: Tue, 14 Jan 2014 07:22:17 GMT

Sample Request (Getting Object Metadata and CORS Configuration when CORS is properly configured)

HEAD /object HTTP/1.1
User-Agent: curl/7.19.0 (x86_64-suse-linux-gnu) libcurl/7.19.0 OpenSSL/0.9.8{ zlib/1.2.3 libidn/1.10
Host: bucketname.obs.example.com
Accept: */*
Date: Tue, 28 Apr 2015 14:03:45 +0000
Authorization: AWS D13E0C94E722DD69423C:YcuaA/lJkmWn8AqjfWvIodNJ/yM=
Origin:www.example.com
Access-Control-Request-Headers:AllowedHeader_1

Sample Response (Getting Object Metadata and CORS Configuration when CORS is properly configured)

HTTP/1.1 200 OK
x-amz-request-id: D168613B12D6EE5744A69C524D3AA876
x-amz-id-2: 35Sas+J9yUY4xz3PrL0O938UKDg+Dc8EfSw0m9LtfoqB7s0wiMc44TOGguSLNyOv
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Access-Control-Allow-Origin: www.example.com
Access-Control-Allow-Methods: POST,GET,HEAD,PUT,DELETE
Access-Control-Allow-Headers: AllowedHeader_1
Access-Control-Max-Age: 100
Access-Control-Expose-Headers: ExposeHeader_1
Accept-Ranges: bytes
ETag: "6bcb16084a88ae550811429c0c1e8bc7"
Last-Modified: Tue, 28 Apr 2015 13:38:05 GMT
Content-Length: 264
Content-Type: binary/octet-stream
Date: Tue, 28 Apr 2015 14:03:45 GMT