Queries the URLs from which you can download the raw access logs of a website.
Operation description
- If you do not specify StartTime or EndTime, the log data generated in the last 24 hours is queried. If you specify StartTime and EndTime, the log data generated within the specified time range is queried.
- The log data is collected every hour.
- You can call this operation up to 50 times per second per account.
- You can query only logs in the last month. The time range cannot exceed 31 days.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| esa:DescribeSiteLogs | none | *Site acs:esa:{#regionId}:{#accountId}:site/{#SiteId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| SiteId | long | Yes | The ID of the website. You can call the ListSites operation to obtain. | 123456*** |
| PageSize | long | No | The number of entries per page. Default value: 300. Valid values: 1 to 1000. | 10 |
| PageNumber | long | 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 parameters
Examples
Sample success responses
JSONformat
{
"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. |
For a list of error codes, visit the Service error codes.
