QueryDomainLogDownloadAddress

更新時間: 2026-08-20 16:31:56

Report Log Multi-Domain Service Interface description Query the log download address of multiple domains. The default granularity of log file is 24 hours and data are returned according to the actual configurations. Around 3-5 hours of data delay

  • データ遅延: 3~5h
  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: Log Download
API認証の詳細については、以下を参照してください:API認証の概要

リクエストパラメータ

Body パラメータ

パラメータ名説明
domain-listObject

Domain list: 1.The default upper limit of the number of domain names is 20 (you can contact technical support for adjustment), The maximum recommended cap is 500 .

*domain-nameList

Domain

*datefromString

Start time: 1.The format is yyyy-MM-ddTHH:mm:ss+00:00 ; 2.Must be smaller than the current time and dateTo ; 3.Period between dataFrom and dateTo cannot be longer than 31 days .

*datetoString

End time, format is yyyy-MM-ddTHH:mm:ss+00:00(The actual range of logs that can be queried depends on the number of days of log retention configured by the domain name).

logTypeString
デフォルト値:cdnbot
選択可能な値:cdnbotddoswaapwaf

Log type, optional values:cdn,bot,ddos,waap,waf;Multiple are separated by English commas. If they are not transmitted, the data will be queried by logtype = cdn,bot by default.

areaCodeString

areaCode(Available only after this feature is enabled; please contact technical support to activate it.)

レスポンスパラメータ

Body パラメータ

パラメータ名説明
logsList
domainString

Domain

areaCodeString

areaCode

filesList
dateFromString

The start time of log file, format is yyyy-MM-dd-HHmm

dateToString

The end time of log file, format is yyyy-MM-dd-HHmm

logUrlString

Download address of log file

fileSizeInteger

Size of log file

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
NotAcceptable

Accept request header not supported, API supports json and xml format only, default is json format

400Accept request header not supported, API supports json and xml format only, default is json format
MalformedXML

Request body XML format error

400Request body XML format error
DomainNameIsRequired

Requrest body is specified and domain array is empty

400Requrest body is specified and domain array is empty
DomainsExcessive

Number of queried domains exceeds limits set to the account

403Number of queried domains exceeds limits set to the account
NoSuchDomain

Domain does not exist, or does not belong to the current account that calls the interface

404Domain does not exist, or does not belong to the current account that calls the interface
InvalidDatePeriod

Date from or dateto does not conform to the specification

400Date from or dateto does not conform to the specification
DateSpanError

Datefrom and dateto differ by more than 31 days

400Datefrom and dateto differ by more than 31 days
ReportError

System error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted)

400System error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted)
InternalError

System error

500System error
PARAM_INVALID

The parameter fileMd5 does not conform to specification

400The parameter fileMd5 does not conform to specification

入力例

JSON
XML
JSON
リクエスト例
コピー コピー完了
#!/bin/bash
# Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response

#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://api.cdnetworks.com/api/report/log/downloadLink" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
    "domain-list": {
        "domain-name": ["www.example1.com","www.example2.com"]
    },
   "datefrom":"2017-06-14T00:00:00+00:00",
   "dateto":"2017-06-17T00:00:00+00:00",
   "logType":"cdn"
}'
レスポンス例
コピー コピー完了
{
      "logs": [
          {
              "domainName":   "www.example1.com",
              "files": [
                  {
                        "dateFrom": "2017-06-14-0000",
                      "dateTo":   "2017-06-14-2359",
                      "logUrl":   "http://dx.wslog.chinanetcenter.com/log/c/www.example1.com/2017-06-14-0000-2330_www.example1.com.cn.log.gz?wskey=00c6ae5d3570005382bc74485900f4edac8d5f00152a",
                      "fileSize": 17397875
                        
                  },
                  {
                        "dateFrom": "2017-06-16-0000",
                      "dateTo":   "2017-06-16-2359",
                      "logUrl":   "http://dx.wslog.chinanetcenter.com/log/c/www.example1.com/2017-06-16-0000-2330_www.example1.com.cn.log.gz?wskey=00c65bc688020053c99ef01a59008f8234e55f00983e",
                        "fileSize": 10570627
                        
                  }
              ]
          }
      ]
  }