Queries the URLs from which you can download the raw access logs of a website.
Operation description
-
If you do not specify StartTime and EndTime, log data from the last 24 hours is returned by default. If you specify StartTime and EndTime, log data for the specified time range is returned.
-
The time granularity for data queries is one hour.
-
The maximum number of calls per user: 50 calls per second.
-
Only log records from the last month can be queried (the time span between the start time and the current time cannot exceed 31 days).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:DescribeSiteLogs |
none |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
The ID of the website. You can call the ListSites operation to obtain. |
123456*** |
| PageSize |
integer |
No |
The number of entries per page. Default value: 300. Valid values: 1 to 1000. |
10 |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. |
1 |
| StartTime |
string |
No |
The beginning of the time range to query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2022-11-06T16:00:00Z |
| EndTime |
string |
No |
The end of the time range to query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. Note
The end time must be later than the start time. |
2022-11-06T17:00:00Z |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
0AEDAF20-4DDF-4165-8750-47FF9C1929C9 |
| SiteLogDetails |
array<object> |
The information about the website log files. |
|
|
array<object> |
|||
| SiteName |
string |
The website name. |
example.com |
| SiteId |
integer |
The website ID. |
123456*** |
| LogCount |
integer |
The total number of entries returned on the current page. |
300 |
| LogInfos |
array<object> |
The details of the website log files. |
|
|
object |
The download URL of the log file. |
||
| LogSize |
integer |
The size of the log file. Unit: bytes. |
438304768 |
| EndTime |
string |
The end time. |
2022-11-06T17:00:00Z |
| LogName |
string |
The name of the log file. |
example.com_2022_11_07_000000_020000.gz.xxxxxx |
| LogPath |
string |
The log path. Note
Take note of the Expires field (expiration timestamp) in this parameter. If the log download URL expires, you must reobtain the URL. |
example.aliyundoc.com /v1.l1cache/105252530/example.com/2022_11_07/example.com_2022_11_07_000000_020000.gz.xxxxxx?Expires=1636963354&OSSAccessKeyId=LTAIviCc6zy8****&Signature=u0V6foRfZniHE8i%2BHUdxGOhZsK**** |
| StartTime |
string |
The create time. |
2022-11-06T16:00:00Z |
| PageInfos |
object |
Pagination information. |
|
| PageSize |
integer |
The number of entries per page. Default value: 300. Valid values: 1 to 1000. |
10 |
| TotalCount |
integer |
The total number of entries returned. |
47 |
| PageIndex |
integer |
The page number returned. |
1 |
Examples
Success response
JSON format
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9",
"SiteLogDetails": [
{
"SiteName": "example.com",
"SiteId": 0,
"LogCount": 300,
"LogInfos": [
{
"LogSize": 438304768,
"EndTime": "2022-11-06T17:00:00Z\n",
"LogName": "example.com_2022_11_07_000000_020000.gz.xxxxxx",
"LogPath": "example.aliyundoc.com /v1.l1cache/105252530/example.com/2022_11_07/example.com_2022_11_07_000000_020000.gz.xxxxxx?Expires=1636963354&OSSAccessKeyId=LTAIviCc6zy8****&Signature=u0V6foRfZniHE8i%2BHUdxGOhZsK****\n",
"StartTime": "2022-11-06T16:00:00Z\n"
}
],
"PageInfos": {
"PageSize": 10,
"TotalCount": 47,
"PageIndex": 1
}
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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 | InvalidStartTime.ValueNotSupported | The StartTime cannot exceed 31 days before the current time. | The request parameter StartTime cannot be 31 days less than the current time. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.