Queries the time series statistics of all traffic, including malicious requests and normal service requests.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeNetworkFlowTimeSeriesMetric |
get |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the WAF instance. Note
Call DescribeInstance to obtain the instance ID. |
waf_cdnsdf3**** |
| Filter |
object |
Yes |
The filter conditions for the query. Multiple filter conditions have a logical AND relationship. |
|
| DateRange |
object |
Yes |
The time range to query. |
|
| StartDate |
integer |
Yes |
The start of the time range to query, in UNIX timestamp format. Unit: seconds. The query time range cannot exceed the last 30 days. Note
The start time must be within the last 30 days. |
1713888000 |
| EndDate |
integer |
Yes |
The end of the time range to query. This value is a UNIX timestamp. Unit: seconds. |
1713888600 |
| Conditions |
array<object> |
No |
A list of filter conditions. Each item describes a filter condition. |
|
|
object |
No |
The configuration of a single filter condition. A filter condition consists of a field name, an operator, and a filter value. For more information about the supported field names and operators, see Additional information about request parameters. |
||
| Key |
string |
No |
The field to use for filtering. This parameter supports the following fields:
|
matched_host |
| OpValue |
string |
No |
The operator. |
eq |
| Values |
any |
No |
The filter value. |
test.waf-top |
| Metric |
string |
Yes |
The metric to query. Different metrics return different data. Valid values:
|
total_requests |
| RegionId |
string |
No |
The region of the WAF instance. Valid values:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfm***q |
Operator descriptions
| Operator | Meaning | Description |
| all-not-match | Not equal to any of the values | The field value is not equal to any value in the collection. For example, to filter requests where real_client_ip is not equal to any value in the collection:{"Key":"real_client_ip","OpValue":"all-not-match","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| eq | Equal to | The field value is equal to a string. For example, to filter statistics for requests where the URL is equal to "/testcase":{"Key":"request_path","OpValue":"eq","Values":"/testcase"} |
| match-one | Equal to one of the values | The field value is equal to any value in the collection. For example, to filter requests where real_client_ip is equal to any value in the collection:{"Key":"real_client_ip","OpValue":"match-one","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| ne | Not equal to | The field value is not equal to a string. For example, to filter statistics for requests where the URL is not equal to "/testcase":{"Key":"request_path","OpValue":"ne","Values":"/testcase"} |
Supported keys for filter conditions
| Field name | Description | Supported operators |
| cluster | The protection cluster. | ne, eq, match-one, all-not-match |
| matched_host | The protected object. | ne, eq, match-one, all-not-match |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. For a sample format, see the Examples section. |
||
| RequestId |
string |
The request ID. |
D827FCFE-90A7-4330-9326-D33C8B4***** |
| NetworkFlowTimeSeries |
array<object> |
The time series data. Multiple data series can be returned. |
|
|
object |
A single time series. The time series data consists of two arrays: Timestamps and Values. The Timestamps array contains a sequence of timestamps at fixed intervals. The Values array contains the statistical count for each interval. The two arrays have the same number of data points, and the data points correspond to each other. |
||
| Metric |
string |
The metric name. This value is the same as the Metric request parameter. |
total_requests |
| Timestamps |
array |
The timestamps. Each value represents the start of a time interval. |
|
|
string |
The start time of each data point. This value is a UNIX timestamp string. |
[] |
|
| Values |
array |
The metric values. Each value represents the count within the corresponding time interval. |
|
|
integer |
The statistical count for the current time range. |
[] |
|
| TimeSeriesMetaData |
object |
The metadata of the returned data. |
|
| DateRange |
object |
The time range that was queried. |
|
| StartDate |
integer |
The start of the time range that was queried. This value is a UNIX timestamp. Unit: seconds. This value is the same as the StartDate request parameter. |
1713888000 |
| EndDate |
integer |
The end of the time range that was queried. This value is a UNIX timestamp. Unit: seconds. This value is the same as the EndDate request parameter. |
1713888600 |
| AggregateInterval |
string |
The time granularity of each data point in the returned time series. For example, "15m" indicates that each data point represents statistics for a 15-minute interval. For more information about the time granularity, see the Time granularity of data points section. |
1m |
| Units |
string |
The unit of the returned data. Default value: requests. |
requests |
Time granularity of data points
The time granularity of the returned data varies based on the specified time range.
-
If the time range is less than 3 hours, the time granularity is 1m (1 minute).
-
If the time range is 3 hours or more and less than 6 hours, the time granularity is 5m (5 minutes).
-
If the time range is 6 hours or more and less than 24 hours, the time granularity is 15m (15 minutes).
-
If the time range is 24 hours or more and less than 7 days, the time granularity is 1h (1 hour).
-
If the time range is 7 days or more and less than 30 days, the time granularity is 1d (1 day).
Examples
Success response
JSON format
{
"RequestId": "D827FCFE-90A7-4330-9326-D33C8B4*****",
"NetworkFlowTimeSeries": [
{
"Metric": "total_requests",
"Timestamps": [
"[]"
],
"Values": [
0
]
}
],
"TimeSeriesMetaData": {
"DateRange": {
"StartDate": 1713888000,
"EndDate": 1713888600
},
"AggregateInterval": "1m",
"Units": "requests"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Waf.Report.%s | Invalid parameter:%s. | Invalid parameter:%s |
| 400 | Waf.Report.InternalError | Server error occurred in report service. | Report Service Internal Error |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.