All Products
Search
Document Center

Edge Security Acceleration:DescribeWafUsageData

Last Updated:Jul 17, 2026

Queries the usage data of WAF by calling DescribeWafUsageData.

Operation description

  • Maximum storage duration: 93 days.

  • Maximum query time range: 31 days.

  • Default time range: 24 hours.

All times are expressed in UTC+0.

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

esa:DescribeWafUsageData

get

*Site

acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

None None

Request parameters

Parameter

Type

Required

Description

Example

StartTime

string

No

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.

2022-08-10T00:00:00Z

EndTime

string

No

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.

Note

The end time must be later than the start time.

2022-08-10T23:59:59Z

SiteId

integer

No

The site ID. You can call the ListSites operation to obtain the site ID.

123456****

SplitBy

string

No

The grouping key. You can set this parameter to domain.

  • domain: groups the data by domain name.

domain

Interval

string

No

The time granularity for the query data, in seconds.

The valid values vary based on the time range specified by StartTime and EndTime:

  • Less than 3 days: Valid values are 300, 3600, and 86400. Default value: 300.

  • 3 to 31 days (exclusive of 31 days): Valid values are 3600 and 86400. Default value: 3600.

  • 31 days or more: The only valid value is 86400. Default value: 86400.

300

RecordName

string

No

The domain record name. You can call the ListSites operation to obtain the domain record name.

test.example.com

Response elements

Element

Type

Description

Example

object

EndTime

string

The end of the time range for the returned data. The time is in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC+0.

2022-08-10T23:59:59Z

StartTime

string

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC+0.

2022-08-10T00:00:00Z

RequestId

string

The request ID.

C370DAF1-C838-4288-A1A0-9A87633D2***

UsageData

array<object>

The returned data.

object

The returned data.

ObserveCount

integer

The number of observed requests.

123

RecordName

string

The domain record name.

test.example.com

BlockCount

integer

The number of blocked requests.

123

AccessCount

integer

The number of requests with normal access.

123

TimeStamp

string

The beginning of the time interval.

The time is in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC+0.

2022-08-10T00:00:00Z

Examples

Success response

JSON format

{
  "EndTime": "2022-08-10T23:59:59Z",
  "StartTime": "2022-08-10T00:00:00Z",
  "RequestId": "C370DAF1-C838-4288-A1A0-9A87633D2***",
  "UsageData": [
    {
      "ObserveCount": 123,
      "RecordName": "test.example.com",
      "BlockCount": 123,
      "AccessCount": 123,
      "TimeStamp": "2022-08-10T00:00:00Z"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter Parameter verification failed. Check your configurations and try again. Parameter verification failed. Check your configurations and try again.
400 TooManyRequests Too many requests.Please try again later. Requests are too frequent, please try again later.
400 QuotaCheckFailed.Function The feature is unavailable in your plan. Upgrade the plan or contact your account manager to request the feature. The feature is unavailable in your plan. Upgrade the plan or contact your account manager to request the feature.
400 InvalidEndTime.Mismatch The specified EndTime is earlier than the StartTime. The end time you entered is earlier than the start time. Please check and try again.
400 InvalidParameter.TimeRange The specified time range exceeds the limit. Adjust it and try again. The specified time range exceeds the limit. Adjust it and try again.
400 InvalidParameter.Field The specified Field is invalid. The specified Field is invalid. For more information, see OpenAPI Documentation .
400 InvalidTime.Malformed Specified start time or end time is malformed. The specified time format is incorrect. The time must conform to the yyyy-MM-ddTHH:mm:ssZ format. Please enter it correctly and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.