All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Log Download Interface

Last updated:2024-03-28 14:41:31

GetDomainLogs

Description

You can call this operation to gets the download address of the original access log of the specified domain name.

  • Note: the default query time is the current day, when the query start time and end time are not specified

Request syntax

The API request contains the specified directory/2016-09-01/log/GetDomainLogs、common request headers, and operation-specific request parameters. For more information, see the sample request.

Request parameters

Parameter Required Type Description
DomainId Yes String Domain name ID: only single domain name input is supported
StartTime Yes String Query start time: the format is yyyy-mm-DD. the default is the current day, when the start time and end time are not specified
EndTime Yes String Query end time: the format is yyyy-mm-DD. the default is the current day, when the start time and end time are not specified
PageSize Yes String Paging size: the value is 1-500; the maximum is 500, the default is 50
PageNumber Yes String Get the page number: the value is: 1-10000, the maximum is 10000, the default is 1

Response parameters

Parameter Type Description
DomainId String Domain ID
PageSize Long PageSize
PageNumber Long PageNumber
TotalCount Long Total count of logs
DomainLogs DomainLogData[] Log information data

DomainLogData

Parameter Type Description
StartTime String Log start time
EndTime String Log end time
LogName String LogName
LogUrl String Log download address, expired in 30 days
LogSize String Log size. The unit is byte

Examples

Sample request

GET method:

GET /2016-09-01/log/GetDomainLogs?PageNumber=1
&PageSize=2
&StartTime=2017-01-03&EndTime=2017-01-03&DomainId=2D09X6F 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainLogs
x-version: 2016-09-01

POST method:

POST /2016-09-01/log/GetDomainLogs 1.1
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: GetDomainLogs
x-version: 2016-09-01
Content-Type: application/json
{
 "StartTime": "2017-01-03",
 "EndTime": "2017-01-03",
 "PageNumber": 1,
 "PageSize": 2,
 "DomainId":"2D09X6F"
 }

Sample response

{
  "DomainId": "2D09X6F",
  "PageSize": 2,
  "PageNumber": 1,
  "TotalCount": 0,
  "DomainLogs": [
    {
      "StartTime": "2017-01-03",
      "EndTime": "2017-01-03",
      "LogName": "2017-01-03.gz",
      "LogUrl": "http://kss.ksyun.com/bucket/test.com/2017-02-17-18-00.log.gz?AccessKeyId=XXXXX&Expires=1487331449&Signature=XXXXXX&response-content-disposition=attachment",
      "LogSize": "5242880"
    }
  ]
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback