Querying Tenant Traffic Data
Function
This API is used to query tenant traffic data.
URI
GET /v1/statistics/traffic
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
Yes |
Long |
Start time (13-digit timestamp). This parameter must be used together with end_time. |
end_time |
Yes |
Long |
End time (13-digit timestamp). This parameter must be used together with start_time. |
type |
Yes |
String |
Type:
Enumeration values:
|
enterprise_project_id |
No |
String |
Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
value |
Long |
Traffic data value, which is returned when type is set to max_flow_bandwidth, max_drop_bandwidth, or ddos_flow. Unit: kbit/s |
flow |
Array of TimeSeriesData objects |
Incoming traffic. This parameter is returned when type is set to flow_drop_traffic. |
drop |
Array of TimeSeriesData objects |
Cleaned traffic. This parameter is returned when type is set to flow_drop_traffic. |
waf |
Array of TimeSeriesData objects |
WAF attack traffic. This parameter is returned when type is set to attack_traffic. |
bot |
Array of TimeSeriesData objects |
Bot attack traffic. This parameter is returned when type is set to attack_traffic. |
cc |
Array of TimeSeriesData objects |
CC attack traffic. This parameter is returned when type is set to attack_traffic. |
ddos |
Array of TimeSeriesData objects |
DDoS attack traffic. This parameter is returned when type is set to attack_traffic. |
Parameter |
Type |
Description |
---|---|---|
time |
Long |
13-digit timestamp. |
value |
Double |
Data value. Unit: kbit/s (for traffic query) or number of events (for event query) |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Query the peak bandwidth of inbound DDoS traffic.
GET https://{Endpoint}/v1/statistics/traffic?type=max_flow_bandwidth&end_time=1691916827257&start_time=1691312027000
Example Responses
Status code: 200
Request succeeded.
{ "value" : 100 }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Invalid request parameter. |
401 |
The account corresponding to the token does not have sufficient permission. |
500 |
Internal server error. |
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