All Products
Search
Document Center

Web Application Firewall:DescribeNetworkFlowTimeSeriesMetric

Last Updated:Sep 16, 2025

Queries the time series statistics for all traffic. This includes malicious and normal business requests.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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

  • cluster

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:

  • qps: The number of requests that WAF processes per second. A queries per second (QPS) value is calculated every 10 seconds. The peak QPS value within the specified time granularity is returned.

  • total_requests: The total number of requests processed by WAF.

  • top5_status: The top five response status codes that WAF returns to the client, and the corresponding time series statistics.

  • top 5_upstream_status: The top five response status codes that the origin server returns to the client, and the corresponding time series statistics.

total_requests

RegionId

string

No

The region where the WAF instance resides. Valid values:

  • cn-hangzhou: the Chinese mainland.

  • ap-southeast-1: outside the Chinese mainland.

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

Operator descriptions

OperatorMeaningDescription
all-not-matchDoes not equal any valueThe 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"]}



eqEqualsThe field value equals a specific string. For example, to filter statistics for URLs that equal "/testcase":
{"Key":"request_path","OpValue":"eq","Values":"/testcase"}



match-oneEquals one of multiple valuesThe 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"]}



neDoes not equalThe 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 nameField meaningSupported operators
clusterProtection cluster.ne, eq,
match-one,
all-not-match










matched_hostProtected 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.