Obtain Bucket Stat

Last update:2025-08-18 15:32:03

This interface allows you to query the storage usage information of buckets on the object storage during a specified time range, mainly including daily peak storage usage information. (Values obtained via this interface are for reference only. Specific billing values will be based on data provided by CDNetworks SAP.)

Request Description

Request Format

GET /bucket/stat?name=<Urlsafe_Base64_Encoded_Names>&startdate=< startdate >&enddate=< enddate>
Host:< MgrDomain>
Authorization:< AccessToken>

Header Description

Parameter Required Description
Host Yes Management domain name , which can be obtained on the Bucket Overview interface of the Console.
Authorization Yes Management Credential

Parameter Description

Parameter Required Description
name Yes Specifies the bucket list queried, the format is as follows: Urlsafe_Base64_Encode(&#124|……)
startdate Yes Start time of statistics, in the format of yyyy-mm-dd.
enddate Yes End time of statistics, in the format of yyyy-mm-dd.
NOTE: The maximum time span for query is six months.
isListDetails No Value can be true or false, indicating whether to return storage details. Default is `false` (not return).
storageType No Optional values: Standard, InfrequentAccess, Archive represent standard, low-frequency, and archived storage respectively. If left blank, the total storage will be returned.

Response Description

  • If a request is successful, a JSON string of the following content will be returned:
  {
        "code":  "200",
        "message": "OK",
        "buckets":[
        {
            "name":"<bucket_name>",
            "detail":[
            {
                "data_time":"< Datatime string>",// yyyy-MM-dd
                "storage":"< storage>"
            }
            ]
        },
         ……
        ]
 }
Field name Required Description
buckets Yes Bucket information queried.
name Yes Bucket name.
detail Yes Bucket details.
data_time Yes Time of statistics, in the format of yyyy-MM-dd.
storage Yes Peak value of storage usage, unit: MB; to 3 decimal places.
  • If a request fails, a JSON character string of the following content will be returned:
  {
        "code":     "< code string>",
        "message":  "< message string>"
  }
Field name Required Description
code Yes HTTP request response code.
message Yes Prompt messages upon bucket query failure.

Example

curl -v -o bucketlist.json -H "Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:NTVjZWZmOThhYjUzMjhkMWQ3YzE3OGM0NTRhYzFmODc5MDQ0MWExNQ==" --url "http://mgrDomain/bucket/stat?name=YnVja2V0MXxidWNrZXQyfGJ1Y2tldDM=&startdate=2017-01-01&enddate=2017-02-01"
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!