Queries the time series statistics for all traffic. This includes malicious and normal business requests.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeNetworkFlowTimeSeriesMetric |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the WAF instance. Note
Call DescribeInstance to query the ID of the current WAF instance. |
waf_cdnsdf3**** |
| Filter |
object |
Yes |
The filter conditions for the query. Multiple filter conditions are combined with a logical AND. |
|
| DateRange |
object |
Yes |
The time range to query. |
|
| StartDate |
integer |
Yes |
The query period cannot exceed the last 30 days. The start of the time range to query. This value is a UNIX timestamp. Unit: seconds. 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 |
No |
A list of filter conditions. Each item in the list 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 information about the supported field names and operators, see Additional information about request parameters. |
||
| Key |
string |
No |
The field to use for the filter operation. This API operation supports the following values for Key:
|
matched_host(防护对象) |
| OpValue |
string |
No |
The operator. |
eq(等于) |
| Values |
any |
No |
The filter value. |
test.waf-top |
| Metric |
string |
Yes |
Specifies the type of data to return. Different values for Metric correspond to different data. This API operation supports the following values:
|
total_requests |
| RegionId |
string |
No |
The region where the WAF instance resides. 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 | Does not equal any value | The field value does not equal any value in the data collection. For example, to filter data where real_client_ip does not equal 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 | Equals | The field value equals a specific string. For example, to filter statistics for URLs that equal "/testcase":{"Key":"request_path","OpValue":"eq","Values":"/testcase"} |
| match-one | Equals one of multiple values | The field value equals any value in the data collection. For example, to filter data where real_client_ip equals 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 | Does not equal | The field value does not equal a specific string. For example, to filter statistics for URLs that do not equal "/testcase":{"Key":"request_path","OpValue":"ne","Values":"/testcase"} |
Supported keys for filter conditions
| Field name | Field meaning | Supported operators |
| cluster | Protection cluster. | ne, eq, match-one, all-not-match |
| matched_host | Protected object. | ne, eq, match-one, all-not-match |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. For a sample format, see Examples. |
||
| RequestId |
string |
The request ID. |
D827FCFE-90A7-4330-9326-D33C8B4***** |
| NetworkFlowTimeSeries |
array<object> |
The returned time series data. Time series data for multiple values can be returned. |
|
|
object |
A single set of time series data. The time series data consists of two arrays: Timestamps and Values. The Timestamps array contains a time series with fixed time intervals. The Values array contains the statistical count for each time interval. These two arrays have the same number of items, and their data points correspond one-to-one. |
||
| Metric |
string |
The type of data returned. This value is the same as the Metric request parameter. |
total_requests |
| Timestamps |
array |
The time series. Each point represents the start time of a time range. |
|
|
string |
The start time for each data point. This is a UNIX timestamp string. |
[] |
|
| Values |
array |
The data series. Each point represents the statistical count within a specific time range. |
|
|
integer |
The statistical count for the current time range. |
[] |
|
| TimeSeriesMetaData |
object |
The metadata of the returned data. |
|
| DateRange |
object |
The time range used for the query. |
|
| 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 for each data point in the returned time series data. For example, a value of "15m" indicates that each returned data point represents the statistics for a 15-minute interval. For information about the time granularity of the returned data, see Time granularity of time series data points. |
1m |
| Units |
string |
The unit of the returned statistical data. The default value is requests. |
requests |
Time granularity of time series 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 of the data points is 1m (1 minute).
If the time range is greater than or equal to 3 hours and less than 6 hours, the time granularity of the data points is 5m (5 minutes).
If the time range is greater than or equal to 6 hours and less than 24 hours, the time granularity of the data points is 15m (15 minutes).
If the time range is greater than or equal to 24 hours and less than 7 days, the time granularity of the data points is 1h (1 hour).
If the time range is greater than or equal to 7 days and less than 30 days, the time granularity of the data points 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.