Retrieves download URLs for 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 both parameters, log data for the specified time range is returned.
-
Data query granularity: one hour.
-
Maximum calls per user: 50 per second.
-
Only log records from the last month can be queried (the start time cannot be more than 31 days before the current time).
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 website ID. You can call the ListSites operation to obtain the ID. |
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. Specify the time in the ISO 8601 yyyy-MM-ddTHH:mm:ssZ format in UTC. |
2022-11-06T16:00:00Z |
| EndTime |
string |
No |
The end of the time range to query. Specify the time in the ISO 8601 yyyy-MM-ddTHH:mm:ssZ format 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 website log file details. |
|
|
array<object> |
|||
| SiteName |
string |
The website name. |
example.com |
| SiteId |
integer |
The website ID. |
123456*** |
| LogCount |
integer |
The total number of log entries on the current page. |
300 |
| LogInfos |
array<object> |
The details of the website log files. |
|
|
object |
The log download URL. |
||
| 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 file path. Note
Note the Expires field (expiration timestamp) in this parameter. If the download URL has expired, call this operation again to obtain a new 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 |
The 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.