Documentation API Docs URL Report QueryTopRankingUrl

QueryTopRankingUrl

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

Applicable Products

universal

API Description

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.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

JSON
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 parameter(s)

Body Params

JSON
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
NotAcceptableAccept request header not supported, interface supports json and xml format only, default is json format400Accept request header not supported, interface supports json and xml format only, default is json format
InvalidHTTPRequestThere   was an error in the body of your HTTP request.400There   was an error in the body of your HTTP request.
InternalErrorWe  encountered an internal error. Please try again.500We  encountered an internal error. Please try again.
InvalidDatePeriodThe date specified is invalid.400The date specified is invalid.
PARAM_INVALIDparam: domain is null or invalid400param: domain is null or invalid
NumberLimitExceededThe 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).
DateSpanErrorYou cannot specify a period greater than 31 day(s).400You cannot specify a period greater than 31 day(s).
PARAM_INVALIDparam: orderBy is null or invalid.400param: orderBy is null or invalid.

Example

XML
JSON
XML
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.atomile.com/api/report/url/top" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-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
<report>
    <result>
        <top-url>
            <top>1</top>
            <url>http://www.aaa.com/1.html</url>
            <total-request>261711615</total-request>
            <total-flow>21.72</total-flow>
            <hit-request>23226715</hit-request>
            <miss-request>270</miss-request>
            <sc-200>0</sc-200>
            <sc-206>0</sc-206>
            <sc-302>0</sc-302>
            <sc-304>0</sc-304>
            <sc-404>0</sc-404>
        </top-url>
        <top-url>
            <top>2</top>
            <url>http://www.aaa.com/2.html</url>
            <total-request>104684646</total-request>
            <total-flow>8.69</total-flow>
            <hit-request>9290686</hit-request>
            <miss-request>108</miss-request>
            <sc-200>0</sc-200>
            <sc-206>0</sc-206>
            <sc-302>0</sc-302>
            <sc-304>0</sc-304>
            <sc-404>0</sc-404>
        </top-url>
        <top-url>
            <top>3</top>
            <url>http://www.aaa.com/3.html</url>
            <total-request>52342323</total-request>
            <total-flow>4.34</total-flow>
            <hit-request>4645343</hit-request>
            <miss-request>54</miss-request>
            <sc-200>0</sc-200>
            <sc-206>0</sc-206>
            <sc-302>0</sc-302>
            <sc-304>0</sc-304>
            <sc-404>0</sc-404>
        </top-url>
    </result>
</report>