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
Test
RAM authorization
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 |
| 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:
|
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. |
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.