All Products
Search
Document Center

Edge Security Acceleration:DescribeSiteLogs

Last Updated:Mar 28, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

esa:DescribeSiteLogs

none

*Site

acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

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.