Spectra Logic
1-800-833-1132 : 1-303-449-6400


Spectra BlackPearl Converged Storage System : Amazon S3 Operations : Amazon S3 Object Operations : Head Object

Head Object
Description
Get object metadata values returned as an HTTP header. This operation is useful to determine if an object exists and you have permission to access it. This is an Amazon S3 compatible operation.
See Head Object for Amazon S3 operation details.
Requests
Syntax
HEAD http[s]://{datapathDNSname}/{bucket_name}/{object_name}
Responses
Response Elements
The operation returns status only.
Notable status codes:
§
§
Example
Sample Request
This request gets the header information for “object1” in “bucket1”.
HEAD http://blackpearl-hostname/bucket1/object1 HTTP/1.1
Sample Response
HTTP/1.1 200 OK
with header information
public void testHeadObjectReturnsMetadataWhenMetadataExists()
   {
      final MockHttpRequestSupport support = new MockHttpRequestSupport();
      final Map< String, String > propertiesMapping = new HashMap<>();
      propertiesMapping.put( "x-amz-meta-test", "this value tests custom metadata" );
      propertiesMapping.put( "x-amz-meta-another", "more than one metadata field can be set" );