Application Shield

ReportStatusCodeLogService

Update time: 2024-10-09 21:02:24

Query the hourly granular status code distribution of multiple domain names

  • Data latency: 30min~1h
  • Single user trigger frequency: 300/5min
  • Applicable Products: Content Acceleration,Flood Shield 2.0,Flood Shield,Application Shield,Cloud Security 2.0,Bot Shield,Dynamic Web Acceleration,Media Acceleration,Cloud VoD

Request

Body Params

NameDescription
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

Response

Body Params

NameDescription
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

Error code

Error code(code)Description(message)HTTP statusSemantic
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.

Example

JSON
JSON
Request example
Copy Copy success
#!/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"]
}'
Response example
Copy Copy success
{
    "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"
                        }
                    ]
                }
            ]
        }
    ]
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!