帮助与文档

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

GET Bucket Statistics

获取存储空间的统计信息 (Statistics),stats 是存储空间的子资源 (subresource),只有存储空间的所有者才能调用。

Request Syntax

GET /?stats HTTP/1.1
Host: <bucket-name>.<zone-id>.qingstor.com
Date: <date>
Authorization: <authorization-string>

Request Parameters

没有请求参数

Request Headers

参见公共请求头

Request Elements

没有请求消息体

Response Headers

参见公共响应头

Response Elements

Name Type Description
count Integer 存储空间存储的对象数量
size Integer 存储空间存储的对象总大小
location String 存储空间所在区域(zone)名称
created Date 存储空间的创建时间
status Enum 存储空间的状态,枚举值:active, suspended

Example

Example Request

GET /?stats HTTP/1.1
Host: mybucket.pek3a.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-Type: application/json
Content-Length: 222
Connection: close
x-qs-request-id: aa08cf7a43f611e5886952542e6ce14b

{
    "count": 89,
    "status": "active",
    "name": "mybucket",
    "created": "2015-07-22T02:23:04.000Z",
    "url": "http://mybucket.pek3a.qingstor.com",
    "location": "zw",
    "size": 151597
}