Service Related

最近更新时间:2020-04-03 09:29:03

GET Service


Description

The GET operation will return a list of all buckets to the requesting authentication user. You need to use the accessKey issued by KS3 to verify the request. Anonymous requests do not receive a list of buckets, and you cannot get a list of buckets that do not belong to you.

Request

Grammar

GET / HTTP/1.1
Host: kss.ksyun.com
Date: date
Authorization: authorization string

Supports returning bucket list according to items. The grammar is:

GET  /?projectIds={projectId} HTTP/1.1
Host: kss.ksyun.com
Date: date
Authorization: authorization string

Explanation:

  • If you need to return the bucket list under the project with project ID 2345, the request is: /?projectIds=2345

  • To return the bucket list under multiple items, for example, to return all bucket lists under item ID 1234, 3456 and 3344, multiple item IDs need to be separated by half a comma in English, and the request is:/?projectIds=1234,3456,3344

  • If there is no parameter projectIds or the value of projectids is null, the bucket list under all projects will be returned

Request parameters

The interface does not use request parameters.

Request header

This interface only uses common request headers. For more information, please click Public request headers.

Response

Response content

Name Description
Bucket Container containing bucket information
Type:Container
Child nodes: Name, CreationDate
Parent node: ListAllMyBucketsResult.Buckets
Buckets Container containing one or more buckets
Type: Container
Child nodes: Bucket
Parent node: ListAllMyBucketsResult
CreationDate Creation date of bucket
Type: date(yyyy-mm-ddThh:mm:ss.timezone, e.g., 2009-02-03T16:45:09.000Z)
Parent node: ListAllMyBucketsResult.Buckets.Bucket
DisplayName Name of bucket owner
Type: String
Parent node: ListAllMyBucketsResult.Owner
ID User ID of Bucket owner
Type: String
Parent node: ListAllMyBucketsResult.Owner
ListAllMyBucketsResult Response information container
Type: Container
Child nodes: Owner, Buckets
Parent node: None
Name Bucket name
Type: String
Parent node: ListAllMyBucketsResult.Buckets.Bucket
Type Bucket type: NORMAL is non archive storage, which can upload standard storage and infrequent access storage; ARCHIVE is archive, which can only upload archive files
Type: String
Parent node: ListAllMyBucketsResult.Buckets.Bucket
Region The region of bucket
Type: String
Parent node: ListAllMyBucketsResult.Buckets.Bucket
Owner Container containing bucket owner information
Type: Container
Parent node: ListAllMyBucketsResult

Special errors

The interface does not return any special errors.

Example

Request example

GET / HTTP/1.1
Host: kss.ksyun.com
Date: Wed, 01 Jan  2014 12:00:00 GMT
Authorization: authorization string

Response example

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
  <Owner>
    <ID>bcaf1ffd86f461ca5fb16fd081034f</ID>
    <DisplayName>webfile</DisplayName>
  </Owner>
  <Buckets>
    <Bucket>
      <Name>quotes</Name>
      <CreationDate>2014-01-01T16:45:09.000Z</CreationDate>
      <Type>NORMAL</Type>
      <Region>SHANGHAI</Region> 
    </Bucket>
    <Bucket>
      <Name>samples</Name>
      <CreationDate>2014-01-01T16:41:58.000Z</CreationDate>
      <Type>ARCHIVE</Type>
      <Region>BEIJING</Region> 
    </Bucket>
  </Buckets>
</ListAllMyBucketsResult>

金山云,开启您的云计算之旅

注册有礼