All Products
Search
Document Center

Web Application Firewall:DescribeNetworkFlowTimeSeriesMetric

Last Updated:Mar 25, 2026

Queries the time series statistics of all traffic, including malicious requests and normal service 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

*

  • acs:ResourceGroupId
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: The protected object.

  • cluster: The protection cluster.

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:

  • qps: The number of requests that WAF processes per second. This is a peak value. WAF calculates a queries per second (QPS) value every 10 seconds and uses the peak value within the specified time granularity as the QPS.

  • total_requests: The total number of requests that WAF processes.

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

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

total_requests

RegionId

string

No

The region of the WAF instance. 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

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.