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


Amazon S3 Operations : Amazon S3 Bucket Operations : Get Bucket (List Objects)

Get Bucket (List Objects)
Description
Returns a list of the objects contained in a bucket. Use parameters as selection criteria to return a list of a subset of the objects. This is an Amazon S3 compatible operation. The parameter max-keys is set by default, so paging is required to get the full list.
See Get Bucket (List objects) for Amazon S3 operation details.
Also see Get Bucket - Spectra S3.
Requests
Syntax
GET http[s]://{datapathDNSname}/{bucket_name}[?delimiter={string}][&marker={string}][&max-keys={integer}][&prefix={string}]
Request Parameters 
Responses
Response Elements
<ListBucketResult>
   <CommonPrefixes>
      <Prefix>{
string}</Prefix>
   </CommonPrefixes>
   ...
   <Contents>
      <ETag>"{string}"</ETag>
      <Key>{string}</Key>
      <LastModified>{YYYY-MM-DDThh:mm:ss.xxxZ}</LastModified>
      <Owner>
         <DisplayName>{string}</DisplayName>
         <ID>{string}</ID>
      </Owner>
      <Size>{64‑bit integer}</Size>
      <StorageClass>{string}</StorageClass>
   </Contents>
   ...
   <CreationDate>{YYYY-MM-DDThh:mm:ss.xxxZ}</CreationDate>
   <Delimiter>{string}</Delimiter>
   <IsTruncated>TRUE|FALSE</IsTruncated>
   <Marker>{string}</Marker>
   <MaxKeys>{integer}</MaxKeys>
   <Name>{string}</Name>
   <NextMarker>{string}</NextMarker>
   <Prefix>{string}</Prefix>
</ListBucketResult>
where the response elements are defined as follows:
If a delimiter is specified, CommonPrefixes contains the portion of an object’s name between the prefix and the next occurrence of the delimiter.
The last date and time the object was modified in the format YYYY-MM-DDThh:mm:ss.xxxZ. If this attribute is null, then the object has not yet been completely received into cache.
Specifies whether the results were truncated (TRUE) or not (FALSE) due to the number of results exceeding MaxKeys. Values: TRUE, FALSE
The object name where the bucket listing begins. Marker is included in the response if it was specified in the request.
If the delimiter parameter was specified, and IsTruncated is TRUE, then NextMarker indicates the object name to use in the marker field in the next request to get the next set of objects.
Example
Sample Request
This request lists the objects in the bucket named “bucket1” using the delimiter “/”.
GET http://blackpearl-hostname/bucket1?delimiter=/ HTTP/1.1
Sample Response
HTTP/1.1 200 OK
<ListBucketResult>
   <CommonPrefixes>
      <Prefix>movies/</Prefix>
   </CommonPrefixes>
   ...
   <Contents>
      <ETag>"88d576b1d168ab4c6582de17cbb9780f-4"</ETag>
      <Key>LICENSE</Key>
      <LastModified/>
      <Owner>
         <DisplayName>user1</DisplayName>
         <ID>2d7a060f-640a-4186-875f-e413a47a85c2</ID>
      </Owner>
      <Size>0</Size>
      <StorageClass/>
   </Contents>
   ...
   <CreationDate>2014-10-02T11:40:12.000Z</CreationDate>
   <Delimiter>/</Delimiter>
   <IsTruncated>FALSE</IsTruncated>
   <Marker/>
   <MaxKeys>1000</MaxKeys>
   <Name>bucket1</Name>
   <NextMarker/>
   <Prefix/>
</ListBucketResult>