GET service ostor-buckets

Description

Lists information on all buckets, buckets of the user specified by either email or ID, as well as multiple or a single bucket specified by name.

Requests

Syntax

GET /?ostor-buckets HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
GET /?ostor-buckets&emailAddress=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
GET /?ostor-buckets&id=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
GET /?ostor-buckets&bucket=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
GET /?ostor-buckets&multi HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>

Parameters

GET service ostor-buckets parameters

Parameter Description Required
emailAddress

User email address.

Type: string.

Default value: none.

No*

id

User ID.

Type: string.

Default value: none.

No*
bucket

Bucket name.

Type: string.

Default value: none.

No*
multi

Lists multiple buckets specified by their names in the request body.

Type: flag.

Default value: none.

No*

* Only one of the required parameters can be set in a single request.

If none of the parameters is set, the response is the list of all buckets.

Headers

This implementation uses only common request headers.

Body

If multi is specified, the request body should contain a list of bucket names in the following format:

["<bucket_name1>", "<bucket_name2>", "<bucket_name3>"]

Responses

Headers

This implementation uses only common response headers.

Body

A JSON dictionary with a bucket list in the following format:

{
"Buckets": [
{
     "name": <name>,
     "epoch": <epoch>,
     "creation_date": <date>,
     "owner_id": <id>,
     "size":
     {
          "current" : <cur>,
          "hmax": <hmax>,
          "h_integral": <hint>,
          "last_ts": <last_ts>
     }
},
{
...
}]
}

Errors

Returns Error Code 400 if more than one parameter is set.

Examples

Sample request #1

Returns information on all buckets in S3.

GET /?ostor-buckets HTTP/1.1
Host: s3.example.com
Date: Wed, 30 May 2018 22:32:00 GMT
Authorization: <authorization_string>

Sample response #1

{
"Buckets": [
    {
        "name": "bucket1",
        "epoch": 0,
        "creation_date": "2018-05-25T17:12:00.000Z",
        "owner_id": "ba7eba06129464c5",
        "size": {
            "current": 12288,
            "h_integral": 7360512,
            "hmax": 12288,
            "last_ts": 424241
            }
    },
    {
        "name": "bucket2",
        "epoch": 0,
        "creation_date": "2018-05-25T13:51:55.000Z",
        "owner_id": "ba7eba06129464c5",
        "size": {
            "current": 46700160,
            "h_integral": 28160196480,
            "hmax": 46700160,
            "last_ts": 424237
            }
    },
    {
        "name": "bucket3",
        "epoch": 0,
        "creation_date": "2018-05-23T10:30:49.000Z",
        "owner_id": "9d80d59edbe2862a",
        "size": {
            "current": 12288,
            "h_integral": 8036352,
            "hmax": 12288,
            "last_ts": 424186
             }
    }
]}

Sample request #2

Returns information on all buckets owned by the S3 user with email user1@example.com.

GET /?ostor-buckets&emailAddress=user1@example.com HTTP/1.1
Host: s3.example.com
Date: Wed, 30 May 2018 22:32:00 GMT
Authorization: <authorization_string>

Sample response #2

{
"Buckets": [
    {
        "name": "bucket1",
        "epoch": 0,
        "creation_date": "2018-05-25T17:12:00.000Z",
        "owner_id": "ba7eba06129464c5",
        "size": {
            "current": 12288,
            "h_integral": 7360512,
            "hmax": 12288,
            "last_ts": 424241
            }
    },
    {
        "name": "bucket2",
        "epoch": 0,
        "creation_date": "2018-05-25T13:51:55.000Z",
        "owner_id": "ba7eba06129464c5",
        "size": {
            "current": 46700160,
            "h_integral": 28160196480,
            "hmax": 46700160,
            "last_ts": 424237
            }
    }
]}

Sample request #3

Returns information on the bucket with the name bucket1.

GET /?ostor-buckets&bucket=bucket1 HTTP/1.1
Host: s3.example.com
Date: Wed, 30 May 2018 22:32:00 GMT
Authorization: <authorization_string>

Sample response #3

{
"Buckets": [
    {
        "name": "bucket1",
        "epoch": 0,
        "creation_date": "2018-05-25T17:12:00.000Z",
        "owner_id": "ba7eba06129464c5",
        "size": {
            "current": 12288,
            "h_integral": 7360512,
            "hmax": 12288,
            "last_ts": 424241
            }
    }
]}

Sample request #4

Returns information on buckets specified in the request body.

GET /?ostor-buckets&multi HTTP/1.1
Host: s3.example.com
Date: Wed, 30 May 2018 22:32:00 GMT
Authorization: <authorization_string>
["bucket2", "bucket3"]

Sample response #4

{
"Buckets": [
    {
        "name": "bucket2",
        "epoch": 0,
        "creation_date": "2018-05-25T13:51:55.000Z",
        "owner_id": "ba7eba06129464c5",
        "size": {
            "current": 46700160,
            "h_integral": 28160196480,
            "hmax": 46700160,
            "last_ts": 424237
            }
    },
    {
        "name": "bucket3",
        "epoch": 0,
        "creation_date": "2018-05-23T10:30:49.000Z",
        "owner_id": "9d80d59edbe2862a",
        "size": {
            "current": 12288,
            "h_integral": 8036352,
            "hmax": 12288,
            "last_ts": 424186
             }
    }
]}