Object Storage Service Operations

GET Service

The GET operation on a service returns a list of all the buckets owned by the authenticated sender of the request.
You must authenticate with a valid Access Key ID. Anonymous requests cannot list buckets.

Request Sample
GET / HTTP/1.1 
Host: brs2.basedomain.com 
Date: date 
Authorization: signature 
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 15:55:19 GMT 
Server: RestServer/1.0 
Content-length: 317 
Content-Type: application/octet-stream 
Cache-Control: no-cache
Connection: close 
<?xml version="1.0" encoding="UTF-8"?> 
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
<Owner> 
<ID>14B5C45B8E359BC1601B7C682D83EB50648AE420</ID> <DisplayName>Test </DisplayName>
</Owner> 
<Buckets> 
<Bucket> 
<Name>polo</Name> 
<CreationDate>2009-07-30T16:31:04.000Z</CreationDate> 
</Bucket> 
</Buckets> 
</ListAllMyBucketsResult> 

In this sample syntax, the Owner field lists information about the bucket owner.
The Buckets field lists buckets and their metadata.

Bucket Operations

PUT Bucket

Using PUT operation on a bucket has a different effect than the PUT operation on objects. If the bucket does not exist, the PUT operation will create the Bucket. Each user may create up to 100 buckets.

Request Sample
PUT / HTTP/1.1 
Host: polo2.brs2.basedomain.com 
Content-Length: 0 Date: date 
Authorization: signature 
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 15:59:05 GMT 
Server: RestServer/1.0 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close 

GET Bucket

Using GET operation on a bucket has a different effect than the GET operation on objects. The GET operation on a bucket lists the content of the whole Bucket.

GET Bucket Parameters

It is possible to pass on several arguments to the GET Bucket request, using URL scheme like ?prefix=prefix;marker=marker;etc.

prefix

This argument of type string limits the response to keys that begin with the specified prefix. You may use prefixes to separate a bucket into different sets of keys.

marker

This argument of type string indicates the listing start point of the bucket. The list will include only the keys that occur after the specified marker. For pagination purposes, it is possible to get the next page of results using the last key of the current page as a marker for instance.

max-keys

This Integer argument determines the maximum number of results the body response should contain.

delimiter

This string argument causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection.

Request Sample
GET / HTTP/1.1 
Host: polo.brs2.basedomain.com 
Date: date 
Authorization: signature 
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 15:55:53 GMT 
Server: RestServer/1.0 
Content-length: 853 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close 
<?xml version="1.0" encoding="UTF-8"?> 
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> 
<Name>polo</Name> 
<Prefix></Prefix> 
<Marker></Marker> 
<MaxKeys>1000</MaxKeys> 
<IsTruncated>false</IsTruncated> 
<Contents>
<Key>chunk</Key> 
<LastModified>2009-08-06T09:11:58.000Z</LastModified>
<ETag>&quot;f436d2e0ed02b7b73bd10c6693e95ac3&quot;</ETag> <Size>18274</Size> <Owner>
<ID>14B5C45B8E359BC1601B7C682D83EB50648AE420</ID> <DisplayName>Test</DisplayName> 
</Owner> 
<StorageClass>STANDARD</StorageClass> 
</Contents> 
<Contents>
<Key>ls</Key> 
<LastModified>2009-08-04T16:28:04.000Z</LastModified>
<ETag>&quot;f58860f27dd2673111083770c9445099&quot;</ETag> <Size>92376</Size>
<Owner>
<ID>14B5C45B8E359BC1601B7C682D83EB50648AE420</ID> <DisplayName>Test</DisplayName> 
</Owner> 
<StorageClass>STANDARD</StorageClass> 
</Contents> 
</ListBucketResult> 

In the example response above, we can see:

DELETE Bucket

Using DELETE operation on a bucket has a different effect than the DELETE operation on objects. The DELETE operation on a bucket deletes it if the bucket is empty.

Request Sample
DELETE / HTTP/1.1 
Host: polo2.brs2.basedomain.com 
Authorization: signature 
Date: date 
Response Sample
HTTP/1.1 204 No Content 
Date: Mon, 10 Aug 2009 15:59:43 GMT 
Server: RestServer/1.0 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close 

Object Operations

PUT Object

The PUT request operation adds an object to a bucket.

The response returned indicates if the object has been stored successfully.

The user must have WRITE access to the bucket to add an object.

PUT Object Parameters

Content-Type

Set a standard MIME type for the content format. Default is binary/octet-stream.

Content-Length

Size of the object in bytes.

Content-MD5

The base64 encoded 128-bit MD5 digest of the message (without the headers).

x-amz-acl

The canned ACL to apply to the object. Options include private, public-read, public-read-write, and authenticated-read.

x-amz-meta

Any header starting with the meta prefix is considered meta-data.

For further information, please refer to the RFC 2616. .

Request Sample
PUT /newChunk HTTP/1.1 
Host: polo.brs2.basedomain.com 
Content-Length: length 
Content-MD5: md5_digest 
Content-Type: type 
Expires: 1249919840 
Authorization: signature 
Date: date 
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 15:57:07 GMT 
Server: RestServer/1.0 
Etag: "956398ac99977fa25bceb979777ebab6" 
Content-Length: 0 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close 

COPY Object

The COPY request operation copies an object from a bucket to another bucket.

The response returned indicates if the object has been copied successfully.

The user must have READ access to the Source Object, WRITE access to the destination bucket to copy an object.

COPY Object Parameters

x-amz-copy-source

This argument contains the name of the source bucket and key of the source object, separated by a slash /.

This string must be URL-encoded, and the source bucket name must be valid.

x-amz-metadata-directive

This argument takes two possible values:

x-amz-copy-source-if-match

This argument will make the request copy the object if its entity tag (Etag) matches the specified value.

x-amz-copy-source-if-none-match

This argument will make the request copy the object if its entity tag (Etag) is other than the specified value.

x-amz-copy-source-if-unmodified-since

This argument will make the request copy the object if it has not been modified since the specified time.

The value for this argument must be a valid HTTP date. See RFC 2616. for more information.

x-amz-copy-source-if-modified-since

This argument will make the request copy the object if it has been modified since the specified time.

The value for this argument must be a valid HTTP date. See RFC 2616. for more information.

Request Sample
COPY /newChunk HTTP/1.1 
Host: polo.brs2.basedomain.com 
x-amz-copy-source: /polo/chunk 
Content-Length: length 
Content-Type: type 
Expires: 1249919840 
Authorization: signature 
Date: date 
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 16:02:21 GMT 
Server: RestServer/1.0 
Etag: "f436d2e0ed02b7b73bd10c6693e95ac3" 
Content-Length: 189 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close 
<?xml version="1.0" encoding="UTF-8"?> 
<CopyObjectResult> 
<LastModified>2009-08-10T16:02:22.000Z</LastModified>
<Etag>&quot;f436d2e0ed02b7b73bd10c6693e95ac3&quot;</ETag>
</CopyObjectResult> 

GET Object

The GET request operation fetches objects from Aruba REST Storage Service.

GET Object Parameters

If-Modified-Since

This argument will make the request return the object only if it has been modified since the specified time.

The value for this argument must be a valid HTTP date. See RFC 2616. for more information.

If-Unmodified-Since

This argument will make the request return the object only if it has not been modified since the specified time.

The value for this argument must be a valid HTTP date. See RFC 2616. for more information.

If-Match

This argument will make the request return the object only if its entity tag (Etag) is identical to the specified value.

If-None-Match

This argument will make the request return the object only if its entity tag (Etag) is different from the specified value.

Request Sample
GET /Chunk HTTP/1.1 
Host: polo.brs2.basedomain.com 
Date: date 
Authorization: signature 
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 16:00:57 GMT 
Server: RestServer/1.0 
Last-modified: Thu, 06 Aug 2009 09:11:58 GMT 
Etag: "f436d2e0ed02b7b73bd10c6693e95ac3" 
Content-length: 18274 
Content-Type: application/octet-stream 
Connection: close 

Data goes here... 

HEAD Object

The HEAD request operation returns metadata information on an object.

The user must have READ / WRITE access to the buckets to add an object.

HEAD Object Parameters

Etag

This option returns the Etag of the Object.

Request Sample
HEAD /Chunk HTTP/1.1 
Host: polo.brs2.basedomain.com 
Authorization: signature 
Date: date
Response Sample
HTTP/1.1 200 OK 
Date: Mon, 10 Aug 2009 16:04:02 GMT 
Server: RestServer/1.0 
Content-length: 553 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close

DELETE Object

The DELETE action removes the given object from Aruba REST Storage Service.

The user must have WRITE access to the bucket to delete an object.

It is not possible to restore a deleted object.

Request Sample
DELETE /Chunk HTTP/1.1 
Host: polo.brs2.basedomain.com 
Authorization: signature 
Date: date 

You can use standard request headers for this action.

Response Sample
HTTP/1.1 204 No Content 
Date: Mon, 10 Aug 2009 15:57:43 GMT 
Server: RestServer/1.0 
Content-Type: application/octet-stream 
Cache-Control: no-cache 
Connection: close