Getting Buckets

In this article

    You can get a list of Amazon S3 buckets.

    Request

    GET https://<hostname>:4443/v5/S3Resources/buckets?accountId=<accountId>&regionType=<regionType>&regionId=<regionId>

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Parameters

    The following parameters must be specified in the URL of the request:

    Parameter

    Type

    Description

    accountId

    string

    Specifies the identification number of a cloud account. For more information on how to get this parameter, see Getting Accounts.

    regionType

    string

    A region type of the object storage.

    regionId

    string

    An identification number of the region to which the bucket belongs.

    Request Body

    None.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 OK.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    The response contains the following information:

    Property

    Type

    Description

    regionType

    string

    A region type of the object storage.

    name

    string

    A bucket name.

    location

    string

    A bucket location.

    region

    string

    A bucket region.

    _links

    Dictionary of string [key] and Object [value]

    Links to related resources (navigation property).

    Examples

    Example 1

    Request:

    GET https://abc.tech.local:4443/v5/S3Resources/buckets?accountId=2c647a18-d475-49c2-8401-0fe72e787c70&regionType=Global

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200 OK

     

    Response Body:

    [

         {

         "regionType": "Global",

         "name": "abor-frankfurt",

         "location": "eu-central-1",

         "region": "EUFrankfurt",

         "links":       {

            "self": {"href": "https://abc.tech.local:4443/v5/S3Resources/buckets/abor-frankfurt?accountId=2c647a18-d475-49c2-8401-0fe72e787c70&RegionType=Global&Region=EUFrankfurt"},

            "account": {"href": "https://abc.tech.local:4443/v5/accounts/2c647a18-d475-49c2-8401-0fe72e787c70"}

         }

      },

         {

         "regionType": "Global",

         "name": "abor-stock",

         "location": "eu-north-1",

         "region": "EUStockholm",

         "links":       {

            "self": {"href": "https://abc.tech.local:4443/v5/S3Resources/buckets/abor-stock?accountId=2c647a18-d475-49c2-8401-0fe72e787c70&RegionType=Global&Region=EUStockholm"},

            "account": {"href": "https://abc.tech.local:4443/v5/accounts/2c647a18-d475-49c2-8401-0fe72e787c70"}

         }

      },

         {

         "regionType": "Global",

         "name": "aborbucket",

         "location": "us-east-1",

         "region": "USEastNVirginia",

         "links":       {

            "self": {"href": "https://abc.tech.local:4443/v5/S3Resources/buckets/aborbucket?accountId=2c647a18-d475-49c2-8401-0fe72e787c70&RegionType=Global&Region=USEastNVirginia"},

            "account": {"href": "https://abc.tech.local:4443/v5/accounts/2c647a18-d475-49c2-8401-0fe72e787c70"}

         }

      }]