Retrieves time series data for WAF event analysis of a website.
Operation description
If you do not specify StartTime and EndTime, this operation returns data from the past 24 hours. If you specify StartTime and EndTime, this operation returns data for the specified time range.
- The time granularity of the returned data varies based on the time span between StartTime and EndTime.
Less than or equal to 3 hours: returns data at a 1-minute granularity.
Greater than 3 hours and less than or equal to 12 hours: returns data at a 5-minute granularity.
Greater than 12 hours and less than or equal to 1 day: returns data at a 15-minute granularity.
Greater than 1 day and less than or equal to 10 days: returns data at an hourly granularity.
Greater than 10 days and less than or equal to 31 days: returns data at a daily granularity.
Because the number of access requests during the query period may be large, the data analytics results may undergo sampling.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
string |
No |
The site ID. You can call the ListSites operation to obtain the site ID. If this parameter is left empty, user-level data is queried. |
11089268296**** |
| 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. |
2023-04-08T16: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. |
2023-04-09T16:00:00Z |
| Interval |
string |
No |
The time granularity of the queried data. Unit: seconds. Based on the maximum time span of a single query, this parameter supports the values 60 (1 minute), 300 (5 minutes), 3600 (1 hour), and 86400 (1 day). For more information, see the supported time granularity section above. |
300 |
| Fields |
array<object> |
Yes |
The query metrics. |
|
|
object |
No |
The query metrics. |
||
| FieldName |
string |
No |
The metric name. Note
For more information about the available dimensions, see Data analytics field description. |
Traffic |
| Dimension |
array |
No |
The query dimension. |
|
|
string |
No |
The query dimension. Note
For more information about the available dimensions, see Data analytics field description. |
ALL |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Data |
array<object> |
The returned data. |
|
|
array<object> |
The returned data. |
||
| FieldName |
string |
The metric name. |
Traffic |
| DimensionName |
string |
The query dimension. |
ALL |
| DimensionValue |
string |
The dimension value. |
ALL |
| DetailData |
array<object> |
The returned data. |
|
|
object |
The returned data. |
||
| TimeStamp |
string |
2023-04-08T16:00:00Z |
|
| Value |
any |
123 |
|
| SummarizedData |
array<object> |
The summarized data. |
|
|
object |
The summarized data. |
||
| FieldName |
string |
The summarized metric name. |
Traffic |
| DimensionName |
string |
The summarized dimension name. |
ALL |
| DimensionValue |
string |
The summarized dimension value. |
ALL |
| AggMethod |
string |
The aggregation method. |
sum |
| Value |
any |
The aggregated value. |
123456 |
| RequestId |
string |
The request ID. |
93652946-2687-5428-8254-533B1E6A*** |
| 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. |
2023-04-08T16:00:00Z |
| 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. |
2023-04-09T16:00:00Z |
| Interval |
integer |
The data granularity. Unit: seconds. |
300 |
| SamplingRate |
number |
The sampling rate. Unit: %. |
100 |
Examples
Success response
JSON format
{
"Data": [
{
"FieldName": "Traffic",
"DimensionName": "ALL",
"DimensionValue": "ALL",
"DetailData": [
{
"TimeStamp": "2023-04-08T16:00:00Z",
"Value": "123"
}
]
}
],
"SummarizedData": [
{
"FieldName": "Traffic",
"DimensionName": "ALL",
"DimensionValue": "ALL",
"AggMethod": "sum",
"Value": "123456"
}
],
"RequestId": "93652946-2687-5428-8254-533B1E6A***",
"StartTime": "2023-04-08T16:00:00Z",
"EndTime": "2023-04-09T16:00:00Z",
"Interval": 300,
"SamplingRate": 100
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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 | TooManyRequests | Too many requests.Please try again later. | Requests are too frequent, please try again later. |
| 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 | Parameter verification failed. Check your configurations and try again. | Parameter verification failed. Check your configurations and try again. |
| 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 | InvalidParameter.Field | The specified Field is invalid. | The specified Field is invalid. For more information, see OpenAPI Documentation . |
| 400 | InvalidParameter.Dimension | The specified Dimension is invalid. | The specified Dimension 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. |
| 400 | TooManyDimensions | Too many query dimensions specified. Delete some and try again. | Too many query dimensions specified. Delete some and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.