GET Bucket operation of QueryIO server will fetch all the objects from the bucket. Request Parameters can be used to retrieve subset of objects from bucket.
GET/queryio/<BucketName>HTTP/1.1 Host: QueryIO.com authorization:<Token>
The GET operation in QueryIO Server uses following request headers:
| Header Name | Description | Type | Default | Required |
|---|---|---|---|---|
prefix
|
Only keys that begin with specified prefix are returned. |
String | None | No |
delimiter
|
Delimiter is used to group keys together as CommonPrefix.Keys that contain same string between the prefix and delimiter are grouped together. |
String | None | No |
max-keys
|
Sets the upper limit to the keys returned in response. There might be fewer keys than max-keys |
String | 100 | No |
marker
|
It is used to specify the order of keys displayed.(Alphabetically) |
String | None | No |
The GET operation in QueryIO Server uses following response elements:
| Name | Description | Type |
|---|---|---|
Contents
|
Contains metadata about each object. |
XML metadata |
CommonPrefixes
|
CommonPrefixes exist only if a delimiter is specified. It contain all keys that contains substring between prefix and delimiter. . |
String |
Delimiter
|
Delimiter which is used to group keys. Keys that contain same string between the prefix and delimiter are grouped together as CommonPrefixes. |
String |
DisplayName
|
Name of Object's owner. |
String |
ETag
|
Etag is MD5 hash result of the object. |
String |
ID
|
ID of the Object's owner. |
String |
IsTruncated
|
Is true if result is truncated due to max-keys.Otherwise it is true. |
String |
Key
|
The object's key. |
String |
LastModified
|
Last modified date and time of Object. |
Date |
Marker
|
Indicates where in the bucket to begin listing. |
String |
MaxKeys
|
Specifies the maximum number of keys that will be returned. |
String |
Name
|
Name of the bucket. |
String |
Owner
|
Owner of the bucket. Children: DisplayName, ID |
String |
Prefix
|
Keys that begin with the specified prefix. |
String |
Size
|
Size of the object in bytes |
String |
StorageClass
|
It is always STANDARD. |
String |
The following request will fetch objects from NewBucket.
GET /queryio/DIR1 HTTP/1.1 Host: QueryIO authorization: iffo6l9hel2hfmbj2384joljgh9mqga58gb9if9593ucli9ke5s2e3854shhcmmm
<xml version="1.0" encoding="UTF-8">
<ListBucketResult xmlns="http://QueryIO/DIR1">
<Name>DIR1</Name>
<Prefix></Prefix>
<Marker></Marker>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>hdfs.txt</Key>
<LastModified>2012-10-17 23:00:30</LastModified>
<ETag>ss23kgfd5f27731c9771293j7853216</ETag>
<Size>128</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a</ID>
<DisplayName>abc</DisplayName>
</Owner>
</Contents>
<Contents>
<Key>myfile.jpg</Key>
<LastModified>2012-09-27 12:21:30</LastModified>
<ETag>ak234e5fd5f27731c9771645a7853216</ETag>
<Size>64994</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>1350306728657652000_719148673</ID>
<DisplayName>hdfs</DisplayName>
</Owner>
</Contents>
</ListBucketResult>This example lists up to 10 keys in the "NewBucket" bucket that start with "A" and occur alphabetically after "App".
GET prefix=A&marker=App&max-keys=10 /queryio/DIR1 HTTP/1.1 Host: QueryIO.com authorization: iffo6l9hel2hfmbj2384joljgh9mqga58gb9if9593ucli9ke5s2e3854shhcmmm
<xml version="1.0" encoding="UTF-8">
<ListBucketResult xmlns="http://QueryIO/DIR1">
<Name>AppPerfect</Name>
<Prefix>A</Prefix>
<Marker>App</Marker>
<MaxKeys>10</MaxKeys>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>App4evr</Key>
<LastModified>2012-10-15 22:46:30</LastModified>
<ETag>assdj23fd5f27731c977as23e7853216</ETag>
<Size>256</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>135030564667652000_719148673</ID>
<DisplayName>Appforyou</DisplayName>
</Owner>
</Contents>
<Contents>
<Key>Apple</Key>
<LastModified>2012-09-27 20:24:11</LastModified>
<ETag>qs345tsk3m27731c97725sd57853216</ETag>
<Size>10248</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>1350306721234562000_719148673</ID>
<DisplayName>webfile</DisplayName>
</Owner>
</Contents>
</ListBucketResult>