Last update:2022-03-01 18:00:53
This interface allows you to query the storage usage information of buckets on the cloud 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.)
GET /bucket/stat?name=<Urlsafe_Base64_Encoded_Names>&startdate=< startdate >&enddate=< enddate>
Host:< MgrDomain>
Authorization:< AccessToken>
Parameter | Required | Description |
---|---|---|
Host | Yes | Management domain name , which can be obtained in the user management interface |
Authorization | Yes | Management Credential |
Parameter | Required | Description |
---|---|---|
name | Yes | Specifies the bucket list queried, the format is as follows: Urlsafe_Base64_Encode( |
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. |
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. |
curl -v -o bucketlist.json -H “Authorization:86622e227a50d49d858c2494a935bc2e4ac543a7:NTVjZWZmOThhYjUzMjhkMWQ3YzE3OGM0NTRhYzFmODc5MDQ0MWExNQ==” --url “http://mgrDomain/bucket/stat?name=YnVja2V0MXxidWNrZXQyfGJ1Y2tldDM=&startdate=2017-01-01&enddate=2017-02-01”