Documentation API Docs Flow Report QueryDomainTotalTraffic

QueryDomainTotalTraffic

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

Applicable Products

universal

API Description

This interface is used to obtain traffic summary information of multiple domain names. Users need to provide a time range and domain name, and the data granularity can be selected as five minutes, one hour, or one day. The returned content includes the total traffic and the traffic value of each time node. This interface helps users monitor and analyze the traffic of multiple domain names, so as to grasp the overall traffic trend and changes.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

JSON
NameDescription
*domainListObject
Domain list. Domain 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 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.And smaller than the current time and 'dateTo'; 3.Period between 'dataFrom' and 'dateTo' cannot be longer than 31 days
*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.Must be greater than 'dateFrom'; 3.If it's greater than the current time, then the current time is 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 actual configured granularity when there is specific configuration to data collecting granularity for the customer.

Response parameter(s)

Body Params

JSON
NameDescription
flowSummaryInteger
Total traffic. Keep two digits of decimals. Unit: MB
flowDataList
flowData
timestampString
Date 1.When the data query 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. 2.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. 3.When the data query granularity is daily, the format is yyyy-MM-dd; the data value of every time slice represents the value of the daily data.Return the time slice contained in start time and the time slice contained in end time
flowInteger
Traffic. Keep two digits of decimals. Unit: MB

Error code

Error code(code)Description(message)HTTP statusSemantic
InvalidDatePerioddatafrom or dateto not compliant to specifications400datafrom or dateto not compliant to specifications
DateSpanErrorPeriod between datafrom and dateto is longer than 31 days400Period between datafrom and dateto is longer than 31 days
InvalidReportTypeParameter type not compliant to specifications400Parameter type not compliant to specifications
DomainNameIsRequiredRequest body is specified and domain array is empty400Request 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
DomainsExcessiveNumber of queried domains exceeds limits set to the account403Number of queried domains exceeds limits set to the account
ReportErrorSystem encountered an error(an error returned from myview, and the error code is neither 200 nor 403) (no longer available, to be deleted)400System encountered an error(an error returned from myview, and the error code is neither 200 nor 403) (no longer available, to be deleted)
InternalErrorSystem has encountered an error500System has encountered an 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/domainflow?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":[
            "www.example1.com",
            "www.example2.com"
        ]
    }
}'
Response example
Copy Copy success
{
  "flow-summary": "1365369.73",
  "flow-data": [
    {
      "timestamp": "2017-11-06 23:55:00",
      "flow": "458145.17"
    },
    {
      "timestamp": "2017-11-06 24:00:00",
      "flow": "128145.17"
    },
    {
      "timestamp": "2017-11-07 00:05:00",
      "flow": "238145.17"
    },
    {
      "timestamp": "2017-11-07 00:10:00",
      "flow": "540934.22"
    }
  ]
}