# DescribeDomainLogs

## 1. API Description

This interface is used to query the log list of a specified acceleration domain.

## 2. Request Parameters

The following request parameters list only includes the required parameters for the interface.

| Parameter Name | Required | Type    | Description                                                               |
| -------------- | -------- | ------- | ------------------------------------------------------------------------- |
| domain         | Yes      | String  | Acceleration domain name                                                  |
| startTime      | No       | String  | Start time                                                                |
| endTime        | No       | String  | End time                                                                  |
| pageSize       | No       | Integer | <p>Pagination size of results.</p><p>Defaults to 20, maximum is 1000.</p> |
| pageNum        | No       | Integer | <p>Page number of results.</p><p>Defaults to 1.</p>                       |

## 3. Output Parameters

| Parameter Name | Type                                                                                                      | Description                                                                                 |
| -------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                                    | Unique request ID, returned with each request. Provide this requestId when locating issues. |
| totalCount     | Integer                                                                                                   | Total number of records matching the criteria.                                              |
| dataSet        | Array of [LogInfo](https://docs.console.zenlayer.com/test/ci-develop-en/networking/datastructure#loginfo) | Result set.                                                                                 |

## 4. Code Example

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

1. **Query Acceleration Domain Log List**

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

Request:
{
  "domain": "cdntest.zenlayer.com",
  "startTime": "2024-09-01T00:00:00Z",
  "endTime": "2024-09-01T23:59:59Z",
  "pageNum": 1,
  "pageSize": 1
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "totalCount": 6,
    "dataSet": [
      {
        "size": "479",
        "duration": "20240901_07_08",
        "downloadUrl": "log-url-xxxxx"
      },
      {
        "size": "479",
        "duration": "20240901_08_09",
        "downloadUrl": "log-url-xxxxx"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Error Codes

The following includes error codes encountered in business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/test/ci-develop-en/api-introduction/instruction/commonerrorcode).
