Flood Shield 2.0

QueryTopRankingUrl

Update time: 2026-07-13 15:50:04

This interface is used to count the number of URL requests and traffic of a domain name within each hour, and generate a ranking list of up to TOP500. Users need to provide the time return and domain name to obtain the total number of URL requests, total traffic, number of hit requests, number of failed requests, and details of different status codes. The interface supports sorting by total number of requests or total traffic to quickly identify high-frequency access or high-traffic URLs. This interface helps users monitor URL access frequency and traffic to adjust corresponding network policies.

  • Data latency: 2-3 hours
  • Limit of request rate per user: 300/5min
  • Applicable Products: APM,Content Acceleration,Dynamic Web Acceleration,Media Acceleration-Live,Media Acceleration VoD,Media Acceleration Live Broadcast,Flood Shield,Flood Shield 2.0
For API authentication details, please refer to: API Authentication Overview

Request

Body Params

NameDescription
dateFromString

Start date:

  1. The time format is yyyy-MM-ddTHH:mm:ss±HH:mm. Please note: ±HH:mm is the time zone offset, which can be adjusted according to your data needs, for example, +00:00 represents UTC time, +08:00 represents East 8th District, and -05:00 represents West 5th District. 2024-01-15T10:30:45+00:00 means UTC time January 15, 2024 10:30:45 AM;
  2. Not Greater Than The Current Time;
  3. Data for the last six months (183 days) are available at most.
dateToString

End time:

  1. The time format is yyyy-MM-ddTHH:mm:ss±HH:mm. Please note: ±HH:mm is the time zone offset, which can be adjusted according to your data needs, for example, +00:00 represents UTC time, +08:00 represents East 8th District, and -05:00 represents West 5th District. 2024-01-15T10:30:45+00:00 means UTC time January 15, 2024 10:30:45 AM
  2. The end time must be greater than the start time. if the end time is greater than the current time, take the current time.
  3. Date from, dateTo, neither passed, default query day; If there is only one unsent, throw an exception
  4. Maximum time interval allowed for queries: 31 days, i.e. the difference between Date from and dateTo cannot exceed 31 days. (Could contact technical support adjustment)
domainList

Domain name:

  1. The default number of domain names is 100, which can be adjusted by contacting technical support. The maximum limit is 500;
  2. Automatic filtering invalid domain name (if pass illegal domain name, can be filtered, query result only returns the data of valid domain name).
  3. Did not deliver this entry, the default query account under all domain names, but when the number of domain names under the account number exceeds the upper limit, prompt an error
orderByString

Ordering:

  1. The optional values are: totalRequest, totalFlow
  2. No default totalRequest

Response

Body Params

NameDescription
topString

Top ranking

urlString

url

totalFlowString

Total flow: unit of measure MB, keeping 2 decimal places

totalRequestString

Total request

hitRequestString

Total hit request

missRequestString

Total miss request

sc200String

Number of requests for status code 200

sc206String

Number of requests for status code 206

sc302String

Number of requests for status code 302

sc304String

Number of requests for status code 304

sc404String

Number of requests for status code 404

Error code

Error code(code)Description(message)HTTP statusSemantic
NotAcceptable

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

400Accept request header not supported, interface supports json and xml format only, default is json format
InvalidHTTPRequest

There   was an error in the body of your HTTP request.

400There   was an error in the body of your HTTP request.
InternalError

We  encountered an internal error. Please try again.

500We  encountered an internal error. Please try again.
InvalidDatePeriod

The date specified is invalid.

400The date specified is invalid.
PARAM_INVALID

param: domain is null or invalid

400param: domain is null or invalid
NumberLimitExceeded

The request was rejected because the number of domain(6) exceeds the limit (5).

400The request was rejected because the number of domain(6) exceeds the limit (5).
DateSpanError

You cannot specify a period greater than 31 day(s).

400You cannot specify a period greater than 31 day(s).
PARAM_INVALID

param: orderBy is null or invalid.

400param: orderBy is null or invalid.

Example

JSON
XML
JSON
Request example
Copy Copy success
#!/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/url/top" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{"dateFrom": "2019-01-01T10:00:00+00:00","dateTo": "2019-01-02T10:00:00+00:00","domain": ["www.aaa.com","www.bbb.com"],"orderBy": "totalRequest"
 }'
Response example
Copy Copy success
{
   "result":[
                    {
                        "top":"1",
                        "url":"http://www.aaa.com/ccdrg13.image",
                        "totalRequest":"37947",
                        "totalFlow":"954624377.23",
                        "hitRequest":"35269",
                        "missRequest":"2678",
                        "sc200":"21331",
                        "sc206":"1",
                        "sc302":"0",
                        "sc304":"146",
                        "sc404":"0"
                    },
                    {
                        "top":"2",
                        "url":"http://www.aaa.com/css/common.jpg",
                        "totalRequest":"12506",
                        "totalFlow":"93871265",
                        "hitRequest":"11766",
                        "missRequest":"740",
                        "sc200":"34553",
                        "sc206":"13",
                        "sc302":"2",
                        "sc304":"0",
                        "sc404":"3"
                    },
                    {
                        "top":"100",
                        "url":"http://www.bbb.com/css/style.css",
                        "totalRequest":"2765",
                        "totalFlow":"12721647",
                        "hitRequest":"2467",
                        "missRequest":"298",
                        "sc200":"443241",
                        "sc206":"7",
                        "sc302":"0",
                        "sc304":"0",
                        "sc404":"0"
                    }
            ]
 }
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!