Querying the Peak Bandwidth Value
You can query data within the past 90 days.
The time span ranges from 1 hour to 31 days.
You can specify up to 100 domain names at a query.
The start time and end time must be specified at the same time. Their values must be precise down to the millisecond, but exact, one hour or one day (00:00:00) intervals are allowed. If the time span is less than 7 days, the time granularity must be one hour, for example, 2020-07-01 08:00:00 and 2020-07-01 09:00:00. If the time span is longer than 7 days but shorter than 31 days, the time granularity must be a whole day, for example, 2020-07-01 00:00:00 and 2020-07-02 00:00:00.
If the start time and end time do not meet the requirements, the returned data may be different from what was expected.
Function
This API is used to query the peak bandwidth value.
URI
GET /v1.0/cdn/statistics/bandwidth
Request
Request parameters
Table 1 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
No |
Long |
Query start timestamp, in milliseconds. |
end_time |
No |
Long |
Query end timestamp, in milliseconds. |
domain_name |
Yes |
String |
Domain name list. Use commas (,) to separate domain names, for example, www.test1.com,www.test2.com. The value ALL indicates that all domain names under a tenant are queried. |
enterprise_project_id |
No |
String |
Enterprise project that the resource belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API. |
Example request
Requested path
GET https://cdn.myhuaweicloud.com/v1.0/cdn/statistics/bandwidth?start_time=1534176000000&end_time=1534258500000&domain_name=www.example.com&enterprise_project_id=0
Response
Response parameters
Table 2 describes the response parameter.
Parameter |
Type |
Description |
---|---|---|
bandwidth |
Object |
Queried data objects. For details, see Table 3. |
bandwidth parameter description
Table 3 describes the parameters.
Parameter |
Type |
Description |
---|---|---|
start_time |
Integer |
Query start timestamp, in milliseconds. |
end_time |
Integer |
Query end timestamp, in milliseconds. |
stat_type |
String |
Statistics type. |
value |
Integer |
Peak value, in bit/s. |
{ "bandwidth": { "value": 5277, "start_time": 1498838400000, "end_time": 1502380500000, "stat_type" : "bw" } }
Status Codes
See Status Codes.
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot