GET Bucket Storage

Using this operation, the bucket owner can obtain the bucket's storage information such as the bucket size and the number of objects in the bucket. The bucket size is a non-negative integer, expressed in bytes.

Request Syntax

GET /?storageinfo HTTP/1.1
Host: bucketname.obs.cn-north-1.myhwclouds.com
Date: date
Authorization: authorization

Request Parameters

This request contains no parameter.

Request Headers

This request uses common headers. For details, see Common Request Headers.

Request Elements

This request contains no element.

Response Syntax

HTTP/1.1 status_code
Date: date
Content-Type: type
Content-Length: length
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GetBucketStorageInfoResult xmlns="http://obs.cn-north-1.myhwclouds.com/doc/2015-06-30/">
<Size>size</Size>
<ObjectNumber>number</ObjectNumber>
</GetBucketStorageInfoResult>

Response Headers

This response uses common headers. For details, see Common Response Headers.

Response Elements

This response contains elements of bucket storage information. Table 1 describes the elements.

Table 1 Response elements

Element

Description

GetBucketStorageInfoResult

Request result that saves bucket storage information, including the stored data size and the number of objects.

Type: XML

Size

Size of stored data.

Type: integer

ObjectNumber

Number of objects.

Type: integer

Error Responses

No special error responses are returned. For details about error responses, see Table 1.

Registration