All Products
Search
Document Center

Edge Security Acceleration:DescribeSiteLogs

Last Updated:Nov 15, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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 Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
esa:DescribeSiteLogsnone
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SiteIdlongYes

The ID of the website. You can call the ListSites operation to obtain.

123456***
PageSizelongNo

The number of entries per page. Default value: 300. Valid values: 1 to 1000.

10
PageNumberlongNo

The page number. Pages start from page 1.

1
StartTimestringNo

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
EndTimestringNo

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

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

0AEDAF20-4DDF-4165-8750-47FF9C1929C9
SiteLogDetailsarray<object>

The information about the website log files.

SiteLogDetailsobject
SiteNamestring

The website name.

example.com
SiteIdlong

The website ID.

123456***
LogCountinteger

The total number of entries returned on the current page.

300
LogInfosarray<object>

The details of the website log files.

LogInfosobject

The download URL of the log file.

LogSizeinteger

The size of the log file. Unit: bytes.

438304768
EndTimestring

The end time.

2022-11-06T17:00:00Z
LogNamestring

The name of the log file.

example.com_2022_11_07_000000_020000.gz.xxxxxx
LogPathstring

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****
StartTimestring

The create time.

2022-11-06T16:00:00Z
PageInfosobject

Pagination information.

PageSizeinteger

The number of entries per page. Default value: 300. Valid values: 1 to 1000.

10
TotalCountinteger

The total number of entries returned.

47
PageIndexinteger

The page number returned.

1

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 codeError codeError messageDescription
400InvalidEndTime.MismatchThe specified EndTime is earlier than the StartTime.The end time you entered is earlier than the start time. Please check and try again.
400InvalidStartTime.ValueNotSupportedThe 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.