Querying Peak Bandwidth
Function
Queries the peak bandwidth within a specific time span.
If no domain name is specified, the peak bandwidth of all streaming domain names of the tenant is queried.
When tenant-level bandwidth data is queried, the app and stream parameters do not take effect.
The maximum query time span is 31 days. You can query data over the past one year.
Constraints
Only the data of domain names added to the new Live console in regions excluding CN North-Beijing1 can be queried. This restriction applies only to the HUAWEI CLOUD Chinese Mainland website.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/stats/bandwidth/peak
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
play_domains |
No |
Array |
Streaming domain name list. Up to 100 domain names can be queried. Separate domain names with commas (,). If no domain name is specified, the peak bandwidth of all streaming domain names of the tenant is queried. |
app |
No |
String |
Application name. |
stream |
No |
String |
Stream name. |
isp |
No |
Array |
Carrier list. Possible values:
If this parameter is not specified, information about all carriers is queried. |
protocol |
No |
String |
Request protocol. |
start_time |
No |
String |
Start time. The format must comply with the ISO 8601 standard (UTC time). The format is YYYY-MM-DDThh:mm:ssZ. The maximum query time span is 31 days. You can query data over the past one year. If this parameter is left empty, data over the past seven days is queried by default. |
end_time |
No |
String |
End time. The format must comply with the ISO 8601 standard (UTC time) and is YYYY-MM-DDThh:mm:ssZ. If this parameter is left blank, the current time is used by default. The end time must be later than the start time. |
service_type |
No |
String |
Service type. The options are as follows:
If this parameter is not specified, data of all service types is queried by default.
NOTE:
This parameter takes effect only for data generated after December 15, 2022. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory when AK/SK-based authentication is used. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used. |
X-Project-Id |
No |
String |
Project ID, which is the same as that used in the URI. This parameter is mandatory when AK/SK-based authentication is used. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
Unique ID of the request. |
Parameter |
Type |
Description |
---|---|---|
bandwidth_list |
Array of PeakBandwidthData objects |
Peak bandwidth values by domain name |
Parameter |
Type |
Description |
---|---|---|
value |
Long |
Peak bandwidth, in bit/s |
domain |
String |
Streaming domain name. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
Unique ID of the request. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
Example Requests
Queries the peak bandwidth of streaming domain names.
GET /v2/{project_id}/stats/bandwidth/peak?play_domains=livepull-test.huaweicloud.com
Example Responses
Status code: 200
This code is returned if the request succeeds.
{ "bandwidth_list" : [ { "value" : 50, "domain" : "livepull-test.huaweicloud.com" } ] }
Status code: 400
This code is returned if the request failed to be fulfilled.
{ "error_code" : "LIVE.100011001", "error_msg" : "Invalid request parameter: play_domains" }
Status Codes
Status Code |
Description |
---|---|
200 |
This code is returned if the request succeeds. |
400 |
This code is returned if the request failed to be fulfilled. |
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.