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"
                        }
                    ]
                }
            ]
        }
    ]
}
이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.