> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zga/accelerator/describeacceleratorlogs.md). Agents can also search and read this documentation through its [MCP server](https://docs.console.zenlayer.com/api-reference/~gitbook/mcp).

# DescribeAcceleratorLogs

## 1. API Description

This API (DescribeAcceleratorLogs) is used to query accelerator proxy logs.

{% hint style="info" %}
**Notes**

* Accelerator logs are aggregated by hour. If there is traffic, logs are packaged every hour and named according to the current hour. For example, 20240308\_16-00000243-101.101.101.101-bakz1.gz is the log from 16:00 (UTC=0) on March 8, 2024.
* Accelerator log collection has some delay. Generally, data before 2 hours ago has no integrity issues. You can set endTime=(current time - 2 hours) and query backwards in whole hours (see input parameter description). Due to possible data collection delays, log data has a chance to be corrected within 24 hours. If you require 100% data integrity, you can call again after 24 hours for data coverage.
  {% endhint %}

## 2. Input Parameters

The following request parameter list only provides API Input Parameters.

| Parameter Name | Required | Type                                                                                                  | Description                                                                                                                                                                                                                                                                                                |
| -------------- | -------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| acceleratorId  | Yes      | String                                                                                                | Accelerator ID                                                                                                                                                                                                                                                                                             |
| vips           | No       | Array of String                                                                                       | <p>Acceleration region entry point virtual IP.</p><p>Note: Required for querying 4-layer acceleration logs.</p>                                                                                                                                                                                            |
| domains        | No       | Array of String                                                                                       | <p>Accelerator domain.</p><p>Note: Required for querying 7-layer acceleration logs.</p>                                                                                                                                                                                                                    |
| startTime      | Yes      | [Timestamp](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/datatype.md) | <p>Query start time.</p><p>Uses the <code>ISO8601</code> standard and UTC time. Format: <code>YYYY-MM-ddTHH:00:00Z</code>.</p><p>Example: 2025-06-11T01:00:00Z, must be whole hour time.</p><p>Note:</p><ul><li>Start time must be less than end time</li><li>Time range: \[startTime, endTime).</li></ul> |
| endTime        | Yes      | [Timestamp](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/datatype.md) | <p>Query end time.</p><p>Uses the <code>ISO8601</code> standard and UTC time. Format: <code>YYYY-MM-ddTHH:00:00Z</code>.</p><p>Example: 2025-06-11T05:00:00Z, must be whole hour time.</p><p>Note:</p><ul><li>Start time must be less than end time</li><li>Time range: \[startTime, endTime).</li></ul>   |

## 3. Output Parameters

| Parameter Name | Type                                                                                                           | Description                                                                                                           |
| -------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                                         | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| dataList       | Array of [AcceleratorLog](https://docs.console.zenlayer.com/api-reference/zga/datastructure.md#acceleratorlog) | Status code collection.                                                                                               |

## 4. Code Examples

{% tabs %}
{% tab title="Example" %}

1. **Query accelerator log list**

```json
POST /api/v2/zga HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeAcceleratorLogs
<Common Request Params>

Request:
{
    "acceleratorId": "acceleratorIdxxxxx",
    "vips": ["101.101.101.101"],
    "startTime": "2024-03-08T16:00:00Z",
    "endTime": "2024-03-08T17:00:00Z"
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "totalCount": 1,
    "logSet": [
        {
            "logUrl": "https://xxx?file=20240308_16-00000243-101.101.101.101-bakz1.gz&token=xxx",
            "logName": "20240308_16-00000243-101.101.101.101-bakz1.gz",
            "logSize": 37481
        },
    ],
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                                    | Description                        |
| ---------------- | --------------------------------------------- | ---------------------------------- |
| 400              | NOT\_EXIST\_VIRTUAL\_IP                       | Virtual IP does not exist          |
| 400              | INVALID\_START\_TIME\_MUST\_BEFORE\_END\_TIME | Start time must be before end time |
