Queries the top-ranking records in a traffic analytics report by website or Alibaba Cloud account.
Operation description
-
If you do not specify StartTime and EndTime, data from the last 24 hours is returned. If you specify StartTime and EndTime, data for the specified time range is returned.
-
Due to a large number of visits during the queried time range, the data analytics results may be sampled.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:DescribeSiteTopData |
none |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
string |
No |
The website ID, which can be obtained by calling the ListSites operation. If you do not specify this parameter, the system returns data by account. |
1150376036***** |
| 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. |
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. Note
The end time must be later than the start time. |
2023-04-09T16:00:00Z |
| Interval |
string |
No |
The time interval between the data entries to return. Unit: seconds. |
300 |
| Fields |
array<object> |
Yes |
The metrics to query. |
|
|
object |
No |
The metric to query. |
||
| FieldName |
string |
No |
The metric name. |
Traffic |
| Dimension |
array |
No |
The dimensions at which you want to query data. |
|
|
string |
No |
The dimension at which you want to query data. Note
For more information, see the corresponding log fields. |
ALL |
|
| Limit |
string |
No |
The number of top-ranking data entries to query. Valid values:
|
5 |
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 dimension at which data was queried. |
ALL |
| DetailData |
array<object> |
The returned data. |
|
|
object |
The returned data. |
||
| DimensionValue |
string |
The dimension value. |
ALL |
| Value |
any |
The queried numeric value. |
123 |
| RequestId |
string |
The request ID. |
35C66C7B-671H-4297-9187-2C447724**** |
| StartTime |
string |
The beginning of the time range during which data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2023-04-08T16:00:00Z |
| EndTime |
string |
The end of the time range during which data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2023-04-09T16:00:00Z |
| SamplingRate |
number |
The sampling rate. |
100 |
Examples
Success response
JSON format
{
"Data": [
{
"FieldName": "Traffic",
"DimensionName": "ALL",
"DetailData": [
{
"DimensionValue": "ALL",
"Value": "123"
}
]
}
],
"RequestId": "35C66C7B-671H-4297-9187-2C447724****",
"StartTime": "2023-04-08T16:00:00Z",
"EndTime": "2023-04-09T16:00:00Z",
"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.