Documentation API Docs Request Report ReportUserRequestCountryService

ReportUserRequestCountryService

Update time: 2026-08-24 09:45:17

Applicable Products

Media Acceleration VoD,Dynamic Web Acceleration,Content Acceleration

API Description

Query the number of requests for multiple domain names in each country and region. (Statistics by visitor IP)

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

NameDescription
dateFromString
Start 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. Can not exceed the current time; 3. The latest half year (183 days) data can be obtained 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 is greater than the start time; 3. If the end time is greater than the current time, the current time is taken. 4. DateFrom and dateTo are not uploaded, defaulting to query the past 24 hours; if only one is not uploaded, throw an exception; 5. The default query interval is 7 days, Maximum query interval allowed: 31 days, that is, the difference between dateFrom and dateTo can not exceed 31 days.
domainList
Domains: 1. Domain is not uploaded: Query all domain names of the account (More than 20 domains will error,you can contact technical support for adjustment); 2. Domain is uploaded: Up to 20 domains are supported(you can contact technical support for adjustment).
areaCodeList
Acceleration area: 1. Acceleration areaCode is not uploaded: Query all acceleration areas by default.
dataIntervalString
Data granularity: 5m: 5 minute granularity; 1h: 1 hour granularity; 1d: 1 day granularity; Default value is 1d.
countryCodeList
Country area: 1. countryCode is not uploaded: Query all country areas by default; 2. countryCode is uploaded: Multiple can be uploaded, such as cn, in. Please refer to the appendix description section of the overview page.
groupByList
Grouped dimension: 1. The optional values are domain, countryCode;Multiple values can be uploaded; 2. If no value is uploaded: Aggregate all data by default.

Response parameter(s)

Body Params

NameDescription
resultList
domainString
Domain
countryDataList
countryCodeString
Country area
totalRequestString
Total number of requests.
requestDataList
timestampString
Time: 1. When the data query granularity is 5m, then the format is yyyy-MM-dd HH:mm; ach time slice value represents the value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 00:05, and the last one is (yyyy-MM-dd+1) 00:00; 2. When the data query granularity is 1h, the format is yyyy-MM-dd HH; Each time slice value represents the value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 01, and the last one is (yyyy-MM-dd+1) 00; 3. When the data query granularity is 1d, the format is yyyy-MM-dd; Each time slice value represents the value of the day; 4. Return the time slices that contained in start time and in end time.
requestString
Number of requests.

Error code

Error code(code)Description(message)HTTP statusSemantic
NotAcceptableThe accept header specified in your request is not acceptable.400The accept header specified in your request is not acceptable.
InvalidHTTPRequestThere was an error in the body of your HTTP request.400There was an error in the body of your HTTP request.
InvalidDatePerioddateFrom or dateTo does not conform to the specification400dateFrom or dateTo does not conform to the specification
DateSpanErrorThe difference between dateFrom and dateTo exceeds the limit400The difference between dateFrom and dateTo exceeds the limit
DomainsExcessiveThe number of domain is excessive once.403The number of domain is excessive once.
PARAM_INVALIDParameter domain does not comply with the specification400Parameter domain does not comply with the specification
PARAM_INVALIDParameter dataInterval does not comply with the specification400Parameter dataInterval does not comply with the specification
PARAM_INVALIDParameter province does not comply with the specification400Parameter province does not comply with the specification
PARAM_INVALIDParameter isp does not comply with the specification\n400Parameter isp does not comply with the specification\n
PARAM_INVALIDParameter groupBy does not comply with the specification\n400Parameter groupBy does not comply with the specification\n
InternalErrorWe 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
# 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/request/country" \
  -X "POST" \
  -H "X-Time-Zone:GMT+00:00" \
  -u "$username:$password" \
  -H "Date: $date" \
  -H "Accept: application/json" \
  -d '{
"dateFrom": "2022-05-19T00:00:00+00:00",
"dateTo": "2022-05-19T20:00:00+00:00",
"domain":["www.test1.com"],
"dataInterval": "5m",
"groupBy": ["domain","countryCode"],
"countryCode": ["cn"]
}'
Response example
Copy Copy success
{
    "code":"0",
    "data":[
        {
            "countryData":[
                {
                    "countryCode":"cn",
                    "requestData":[
                        {
                            "request":"892668",
                            "timestamp":"2022-05-19 12:00"
                        },
                        {
                            "request":"1526643",
                            "timestamp":"2022-05-19 12:05"
                        },
                        {
                            "request":"368738",
                            "timestamp":"2022-05-19 12:10"
                        }
                    ],
                    "totalRequest":"2788049"
                }
            ],
            "domain":"www.test1.com"
        }
    ],
    "message":"success"
}