Queries the address where you can download the raw access log data of a specific domain name.

Before you call this operation, take note of the following rules:

Log data is retained for at most one month.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different software development kits (SDKs).

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeCdnDomainLogs

The operation that you want to perform. Set the value to DescribeCdnDomainLogs.

DomainName String Yes www.yourdomain.com

The accelerated domain name. You can specify only one domain name.

LogDay String No 2015-05-24

The time range to query.

  • Set this parameter in the yyyy-MM-dd format.
  • Set one of the following parameters: LogDay, StartTime, and EndTime.
  • Default value: LogDay.
PageSize Long No 300

The number of entries to return on each page.

  • Maximum value: 1000.
  • Valid values: an integer from 1 to 1000.
  • Default value: 300.
PageNumber Long No 2

The number of the page to return.

Valid values: >an integer equal to or larger than 1.

StartTime String No 2017-12-21T08:00:00:00Z

The beginning of the time range to query. Specify the time in the ISO 8601 standard in UTC.

EndTime String No 2017-12-22T08:00:00:00Z

The end of the time range to query.

  • The end of the time range to query. The end time must be later than the start time.
  • The maximum time range that can be queried is one year.
  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format in UTC.

Response parameters

Parameter Type Example Description
PageNumber Long 1

The page number of the returned page.

PageSize Long 100

The number of entries returned on each page.

TotalCount Long 3

The total number of entries returned.

RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

DomainLogModel Struct

The log model.

DomainName String gc.ggter.com

The domain name.

DomainLogDetails Array

The information about the log.

DomainLogDetail
LogPath String cdnlog.cn-hangzhou.oss.aliyun-inc.com/gc.ggter.com/2015_05_23/gc.ggter.com_2015_05_23_1100_1200.gz?OSSAccessKeyId\u003dxxxxxxx\u0026Expires\u003d1432539994\u0026Signature\u003d7Ly4ccKN3afzAGYyWDbxBcOcn2I%3D

The path of the log.

StartTime String 2017-12-21T08:00:00:00Z

The start of the time range that was queried.

EndTime String 2017-12-22T08:00:00:00Z

The end of the time range that was queried.

LogSize Long 257

The size of the log file.

LogName String gc.ggter.com_2015_05_23_1100_1200.gz

The name of the log file.

Examples

Sample requests

https://cdn.aliyuncs.com?Action=DescribeCdnDomainLogs
&DomainName=example.com
&LogDay=2015-05-24
&<Common request parameters>

Sample success responses

XML format

<DescribeCdnDomainLogsResponse>
      <DomainLogModel>
            <DomainName>example.com</DomainName>
            <DomainLogDetails>
                  <DomainLogDetail>
                        <EndTime>2015-05-23T04:00:00Z</EndTime>
                        <LogName>gc.ggter.com_2015_05_23_1100_1200.gz</LogName>
                        <LogPath>cdnlog.cn-hangzhou.oss.aliyun-inc.com/example.com/2015_05_23/xxx</LogPath>
                        <LogSize>257</LogSize>
                        <StartTime>2015-05-23T03:00:00Z</StartTime>
                  </DomainLogDetail>
                  <DomainLogDetail>
                        <EndTime>2015-05-23T08:00:00Z</EndTime>
                        <LogName>gc.ggter.com_2015_05_23_1500_1600.gz</LogName>
                        <LogPath>cdnlog.cn-hangzhou.oss.aliyun-inc.com/example.com/2015_05_23/xxx</LogPath>
                        <LogSize>194</LogSize>
                        <StartTime>2015-05-23T07:00:00Z</StartTime>
                  </DomainLogDetail>
                  <DomainLogDetail>
                        <EndTime>2015-05-23T14:00:00Z</EndTime>
                        <LogName>gc.ggter.com_2015_05_23_2100_2200.gz</LogName>
                        <LogPath>cdnlog.cn-hangzhou.oss.aliyun-inc.com/example.com/2015_05_23/xxx</LogPath>
                        <LogSize>258</LogSize>
                        <StartTime>2015-05-23T13:00:00Z</StartTime>
                  </DomainLogDetail>
            </DomainLogDetails>
      </DomainLogModel>
      <RequestId>1805F349-0A2B-41D9-B4AD-33632AFC27F1</RequestId>
      <PageNumber>1</PageNumber>
      <TotalCount>3</TotalCount>
      <PageSize>100</PageSize>
</DescribeCdnDomainLogsResponse>

JSON format

{
  "DomainLogModel": {
    "DomainName": "example.com",
    "DomainLogDetails": {
      "DomainLogDetail": [
        {
          "EndTime": "2015-05-23T04:00:00Z",
          "LogName": "gc.ggter.com_2015_05_23_1100_1200.gz",
          "LogPath": "cdnlog.cn-hangzhou.oss.aliyun-inc.com/example.com/2015_05_23/xxx",
          "LogSize": 257,
          "StartTime": "2015-05-23T03:00:00Z"
        },
        {
          "EndTime": "2015-05-23T08:00:00Z",
          "LogName": "gc.ggter.com_2015_05_23_1500_1600.gz",
          "LogPath": "cdnlog.cn-hangzhou.oss.aliyun-inc.com/example.com/2015_05_23/xxx",
          "LogSize": 194,
          "StartTime": "2015-05-23T07:00:00Z"
        },
        {
          "EndTime": "2015-05-23T14:00:00Z",
          "LogName": "gc.ggter.com_2015_05_23_2100_2200.gz",
          "LogPath": "cdnlog.cn-hangzhou.oss.aliyun-inc.com/example.com/2015_05_23/xxx",
          "LogSize": 258,
          "StartTime": "2015-05-23T13:00:00Z"
        }
      ]
    }
  },
  "RequestId": "1805F349-0A2B-41D9-B4AD-33632AFC27F1",
  "PageNumber": 1,
    "TotalCount": 3,
    "PageSize": 100
}

Error codes

HttpCode Error code Error message Description
400 InvalidLogDay.Malformed LogDay is malformed. the expected format is yyyy-MM-dd The error message returned because the LogDay parameter is set in an invalid format. Set the parameter in the yyyy-MM-dd format.
400 InvalidPageNumber.ValueNotSupported The specified value of parameter PageNumber is not supported. The error message returned because PageNumber is set to an invalid value.
400 InvalidPageSize.ValueNotSupported The specified value of parameter PageSize is not supported. The error message returned because PageSize is set to an invalid value.
400 MissingParameter The parameter StartTime miss. The error message returned because StartTime is not set.
400 MissingParameter The parameter EndTime miss. The error message returned because EndTime is not set.
400 InvalidStartTime.Malformed Specified StartTime is malformed. The error message returned because the format of the specified start time is invalid. For more information about the time format, see the Request parameters section.
400 InvalidEndTime.Malformed Specified EndTime is malformed. The error message returned because the format of the specified end time is invalid. For more information about the time format, see the Request parameters section.
400 InvalidEndTime.Mismatch Specified end time does not math the specified start time. The error message returned because the end time must be later than the start time.

For a list of error codes, visit the API Error Center.