Documentation API Docs Request Report QueryDomainTotalRequest

QueryDomainTotalRequest

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

Applicable Products

universal

API Description

This interface is used to query the total number of requests for multiple domain names. Users provide information such as time and domain name, and the interface will return the number of requests in each time segment, supporting data of different granularities (such as data every five minutes, every hour, or every day). This interface helps users monitor website access and follow up and optimize abnormal situations in a timely manner.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

JSON
NameDescription
*domainListObject
Domain listDomain number limits can be adjusted depending on different accounts. The default value is 1000(if you want to adjust,please, contact technical support)
*domainNameList
Domain
*dateFromString
Start time 1.The format is yyyy-MM-ddTHH:mm:ss+08:00; 2.And smaller than the current time and dateTo; 3.Period between dataFrom and dateTo should not be longer than 31 days;
*dateToString
End time 1.The format is yyyy-MM-ddTHH:mm:ss+08:00 2.Must be greater than dateFrom; 3.If it is greater than the current time, then the current time will be assigned as the value;
*typeString
Data granularity 1.fiveminutes: five minutes, hourly: one hour, daily: one day; 2.If not specified, daily is set as the default value; 3.If fiveminutes is specified as the value, then data is returned in the granularity of actual configuration when there is specific configuration of the data collecting granularity for the customer

Response parameter(s)

Body Params

JSON
NameDescription
hitSummaryInteger
Total requests
hitDataList
hitData
timestampString
Date When the querying data granularity is fiveminutes, 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. The first time slice of the day is yyyy-MM-dd 00:05 AM, and the last one is yyyy-MM-dd 24:00;When the data query granularity is hourly, the format is yyyy-MM-dd HH; the data value of every time slice represents the data value within the previous time granularity range. The first time slice of the day is yyyy-MM-dd 00:01, and the last one is yyyy-MM-dd 24;When the querying data granularity is daily, the format is yyyy-MM-dd; the data value of every time slice represents the value of the data;Return the time slices contained in start time and in end time
hitInteger
Total number of requests, More than 6 digits are displayed in scientific notation,e.g.:1642565=1.642565E6

Error code

Error code(code)Description(message)HTTP statusSemantic
DomainNameIsRequiredRequrest body is specified and   domain array is empty400Requrest body is specified and   domain array is empty
NoSuchDomainDomain does not exist, or does   not belong to the current account that calls the interface404Domain does not exist, or does   not belong to the current account that calls the interface
InvalidDatePerioddatefrom of dateto does not conform to the specification.400datefrom of dateto does not conform to the specification.
DateSpanErrordatefrom and dateto should not be more than 31 days apart.400datefrom and dateto should not be more than 31 days apart.
InvalidReportTypeParameter type does not conform to the specification.400Parameter type does not conform to the specification.
DomainsExcessiveThe number of domains passed exceeds the account limit.403The number of domains passed exceeds the account limit.
ReportErrorSystem error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted)400System error ( log group interface response error and error code not 200 and 404) (no longer available, to be deleted)
InternalErrorSystem error500System error

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.atomile.com/api/report/domainhit?dateFrom=2017-11-06T23:55:00%2B00:00&dateTo=2017-11-07T00:10:00%2B00:00&type=fiveminutes" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"domain-list": {
   "domain-name":["test.com","test2.com"]
    }
}'
Response example
Copy Copy success
{
  "hit-summary": "129",
  "hit-data": [
    {
      "timestamp": "2017-11-06 23:55:00",
      "hit": "20"
    },
    {
      "timestamp": "2017-11-06 24:00:00",
      "hit": "10"
    },
    {
      "timestamp": "2017-11-07 00:05:00",
      "hit": "20"
    },
    {
      "timestamp": "2017-11-07 00:10:00",
      "hit": "30"
    },
    {
      "timestamp": "2017-11-07 00:15:00",
      "hit": "49"
    }
  ]
}