帮助与文档

我们为你提供丰富、详尽的使用指南以及产品文档

GET Service (List Buckets)

获取请求者名下的所有存储空间列表(Bucket list)。 不支持匿名请求,请先注册青云账号并创建 Access Key 后才能调用此 API 。

请求只能发向对象存储服务的 global 地址,也就是 qingstor.com

Request Syntax

GET / HTTP/1.1
Host: qingstor.com
Date: <date>
Authorization: <authorization-string>

Request Parameters

没有请求参数

Request Headers

参见公共请求头

Header Name Type Description Required
Location Enum 限定存储空间的区域(zone),目前支持 pek3a, sh1a No

Request Elements

没有请求消息体

Response Headers

参见公共响应头

Response Elements

Name Type Description
count Int 存储空间的数量
buckets List 存储空间元信息列表

Example

Example Request

GET / HTTP/1.1
Host: qingstor.com
Date: Sun, 16 Aug 2015 09:05:00 GMT
Authorization: authorization string

Example Response

HTTP/1.1 200 OK
Server: QingStor
Date: Sun, 16 Aug 2015 09:05:00 GMT
Content-Length: 256
Connection: close
x-qs-request-id: aa08cf7a43f611e5886952542e6ce14b

{
  "count": 2,
  "buckets": [
    {
      "name": "mybucket",
      "location": "pek3a",
      "url": "https://mybucket.pek3a.qingstor.com",
      "created": "2015-07-11T04:45:57Z"
    },
    {
      "name": "myphotos",
      "location": "pek3a",
      "url": "https://myphotos.pek3a.qingstor.com",
      "created": "2015-07-12T09:40:32Z"
    }
  ]
}