APM
StatusCode Report
ReportStatusCodeRealTimeEdgeService
QueryStatusCodeDistributionOfeachISPandProvince
QueryISPProvinceStatusCode
QueryIPV6StatusOfeachISPandProvince
QueryRealTimeOriginStatusCode
QueryStatusCodeDistribution
QueryOriginStatusCodeDistribution
Bandwidth Report
Request Report
Visitor Report
URL Report
Domain Management
Domain Configuration
Flow Report
Other

ReportStatusCodeRealTimeEdgeService

Update time: 2025-03-28 16:15:24

Query minute-level data of edge status codes. Users can specify the start time, end time, and domain name to query the request count data corresponding to the status codes. The data granularity can be selected as either 1 minute or 5 minutes in the request. The return result includes the number of requests per minute for each status code.

  • Data latency: 5min
  • Single user trigger frequency: 300/5min
  • Applicable Products: APM,Content Acceleration,Dynamic Web Acceleration

Request

Body Params

NameDescription
dateFromString
Start time: 1. Start time: time format is yyyy-MM-ddTHH:mm:ss+08:00, for example, 2016-12-02T10:00:00+08:00 (December 2rd, 2016, 10:00 a.m., Beijing Time); 2. Not greater than the current time 3. The most recent half-year (183 days) data can be obtained
dateToString
End time: 1. The time format is 2016-12-02T10:00:00+08:00 2. End time should be greater than start time. If the end time is greater than current time, current time will be used. 3. If both fields of dataFrom and dateTo are left empty, then data in the last 1 hours will be queried by default; if one field is filled and one is left empty, then exception will occur. 4. Maximum time range allowable for query: 1 hour, means the period between dateFrom to dateTo should not exceed 1 hour
*domainList
Domain: 1. The default upper limit of domains that can be entered is 20 (if you want to adjust, please, contact 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) 3. Domain name exceeding limit, misstatement
dataIntervalString
Data granularity: 1. default 1m 2. 1m (1 minute), 5m (5 minutes)

Response

Body Params

NameDescription
resultList
result
statusCodeDataList
statusCodeData
statusCodeString
Status code
requestDataList
requestData
timestampString
DateTime, the format is yyyy-MM-dd HH:mm; the data value of every time slice represents the data value within the previous time granularity range.
valueString
Number of requests for status codes

Error code

Error code(code)Description(message)HTTP statusSemantic
MissingBodyThis operation requires a body. Ensure that the body is present and the Content-Type header is set.400The request body was not delivered
NotAcceptableThe accept header specified in your request is not acceptable.400The Accept request header does not support it. The API only supports json and xml formats. The default format is json
InvalidHTTPRequestThere was an error in the body of your HTTP request.400Request body format error
InvalidDatePeriodThe date specified is invalid.400The dateFrom or dateTo does not conform to the specification
DateSpanErrorYou cannot specify a period greater than 60 minute(s).400More than 60 minutes (1 hour) between dateFrom and dateTo
PARAM_INVALIDparam: domain is null or invalid.400Parameter domain does not conform to specification
NumberLimitExceededThe request was rejected because the number of domain({actual}) exceeds the limit ({expect}).400Number of domains passed exceeds account limit
PARAM_INVALIDparam: dataInterval is null or invalid.400Parameter dataInterval does not conform to specification
InternalErrorWe encountered an internal error. Please try again.500We encountered an internal error. Please try again.

Example

XML
JSON
XML
Request example
Copy
#!/bin/bash
# Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response

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/real-time/edge" \
-X "POST" \
-H "X-Time-Zone:GMT+08:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-d '{"dateFrom": "2019-01-01T10:00:00+08:00","dateTo": "2019-01-01T11:00:00+08:00","domain": ["www.baidu1.com","www.baidu2.com"],"dataInterval": "5m"
}'
Response example
Copy
<?xml version="1.0" encoding="UTF-8"?>
 
<report>
    <result>
        <report>
            <status-code-data>
                <status-code-request-data>
                    <status-code>100</status-code> 
                    <request-data>
                        <detail>
                            <timestamp>2019-02-21 00:00</timestamp> 
                            <value>10000</value>
                        </detail> 
                        <detail>
                            <timestamp>2019-02-21 00:05</timestamp> 
                            <value>10000</value>
                        </detail>
                    </request-data>
                </status-code-request-data> 
                <status-code-request-data>
                    <status-code>200</status-code> 
                    <request-data>
                        <detail>
                            <timestamp>2019-02-21 00:05</timestamp> 
                            <value>30000</value>
                        </detail> 
                        <detail>
                            <timestamp>2019-02-21 00:15</timestamp> 
                            <value>10000</value>
                        </detail>
                    </request-data>
                </status-code-request-data> 
                <status-code-request-data>
                    <status-code>300</status-code> 
                    <request-data>
                        <detail>
                            <timestamp>2019-02-21 00:15</timestamp> 
                            <value>10000</value>
                        </detail>
                    </request-data>
                </status-code-request-data> 
                <status-code-request-data>
                    <status-code>400</status-code> 
                    <request-data>
                        <detail>
                            <timestamp>2019-02-21 00:10</timestamp> 
                            <value>30000</value>
                        </detail>
                    </request-data>
                </status-code-request-data> 
                <status-code-request-data>
                    <status-code>500</status-code> 
                    <request-data>
                        <detail>
                            <timestamp>2019-02-21 00:05</timestamp> 
                            <value>10000</value>
                        </detail> 
                        <detail>
                            <timestamp>2019-02-21 00:10</timestamp> 
                            <value>10000</value>
                        </detail>
                    </request-data>
                </status-code-request-data>
            </status-code-data>
        </report>
    </result>
</report>

Directory

  • Request
  • Response
  • Error code
  • Example
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!