Application Shield

ReportStatusCodeLogService

更新時間: 2024-10-09 21:02:24

Query the hourly granular status code distribution of multiple domain names

  • データ遅延: 30min~1h
  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: Content Acceleration,Flood Shield 2.0,Flood Shield,Application Shield,Cloud Security 2.0,Bot Shield,Dynamic Web Acceleration,Media Acceleration,Cloud VoD

リクエストパラメータ

Body パラメータ

パラメータ名説明
dateFromString
From date: 1.The time format is yyyy-MM-ddTHH:MM:ss+08:00. 2.Cannot exceed current time 3.The most recent six-month (183 days) data are available.
dateToString
End time: 1.The time format is yyyy-MM-ddTHH:MM:ss+08:00. 2.The end time needs to be greater than the start time. If the end time is greater than the current time, take the current time. 3.If both fields of dataFrom and dateTo are left empty, the default query past 1 day; If there is only one unsent, throw an exception 4.Maximum allowed query time interval: 30 days, Date from and dateTo, not more than 30 days
domainList
Domain: 1.Allowable maximum number of domain is 20 (can be adjusted by contacting technical support). 2.Automatically filter out illegal domain names (pass illegal domain names, will be filtered out, the query results only return the data of legitimate domain names)
groupByList
1.Selection:domain 2.If groupBy left empty, merge date of all domains

レスポンスパラメータ

Body パラメータ

パラメータ名説明
codeString
messageString
dataList
domainString
Domain. If merge date of all domains will not return domain
statusCodeDataListList
statusCodeString
Status code
detailListList
timestampString
timestamp,Returns the timestamp between the start time and end time.Time format: Hours: yyyy MM DD hh:00:00
valueString
Status code times

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
24102014This operation requires a body. Ensure that the body is present and the Content-Type header is set.400This operation requires a body. Ensure that the body is present and the Content-Type header is set.
24102013The accept header specified in your request is not acceptable.400The accept header specified in your request is not acceptable.
24102020The value of X-Time-Zone header specified in your request in invalid.400The value of X-Time-Zone header specified in your request in invalid.
24102002There was an error in the body of your HTTP request.400There was an error in the body of your HTTP request.
24102006The date specified is invalid.400The date specified is invalid.
24102007You cannot specify a period greater than xx minutes.400You cannot specify a period greater than xx minutes.
24102019The request was rejected because the number of domain(xx) exceeds the limit (xx).400The request was rejected because the number of domain(xx) exceeds the limit (xx).
24102008param: domain is null or invalid.400param: domain is null or invalid.
24102008param: groupBy is null or invalid.400param: groupBy is null or invalid.
24102500We encountered an internal error. Please try again.500We encountered an internal error. Please try again.

入力例

JSON
JSON
リクエスト例
コピー コピー完了
#!/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/status-code/log" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
  "dateFrom": "2021-11-18T00:00:00+08:00",
  "dateTo": "2021-11-18T10:00:00+08:00",
   "domain":["www.test.com"],
   "groupBy":["domain"]
}'
レスポンス例
コピー コピー完了
{
    "code": "0",
    "message": "success",
    "data": [
        {
            "domain": "www.test.com",
            "statusCodeDataList": [
                {
                    "statusCode": "400",
                    "detailList": [
                        {
                            "timestamp": "2021-11-18 01:00",
                            "value": "10"
                        },
                         {
                            "timestamp": "2021-11-18 02:00",
                            "value": "20"
                        }
                    ]
                }
            ]
        }
    ]
}