Documentation API Docs Flow Report GetOriginTrafficAndRequestsForMultiDomains

GetOriginTrafficAndRequestsForMultiDomains

Update time: 2026-09-04 15:36:56

Applicable Products

Dynamic Web Acceleration,Media Acceleration Live Broadcast,Content Acceleration,Media Acceleration VoD

API Description

This interface is designed to query the back-to-source traffic and number of requests for multiple domain names. Users can obtain this data by entering information such as the start time, end time, and specified domain name. The interface returns the total traffic, total number of requests, request and bandwidth peaks for each domain name and their corresponding time points, and supports providing detailed traffic, request, and bandwidth data at a minute granularity. This feature helps users monitor and analyze website back-to-source traffic.

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. Not greater than the current time; 3. The data can be queried is the last week (183 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. End time should be greater than start time. If the end time is greater than current time, current time will be used. 3. If both fields of dataFrom and dateTo are left empty, then data in the last 24 hours will be queried by default; if one field is filled and one is left empty, then exception will occur. 4. Maximum query time interval allowed: 1 day by default, that is, the difference between dateFrom and dateTo cannot exceed 1 day (you can contact technical support to adjust it, the maximum adjustment is 31 days)
granularityString
Data granularity: 1. Support 5m (granularity of 5 minutes) and 1m
domainList
Domain name: 1. The default upper limit of domains that can be entered is 200 (if you want to adjust, please, contact technical support); 2. All domains under the account will be queried if this input parameter is not specified. But if the number of domains under the account exceeds the limits, no query will be executed (Error)
groupByList
Grouping keywords: 1. By default, data will be displayed by group; 2. If there are keywords entered, value details shall be displayed by keywords; If groupBy is specified as domain, it means the results are returned according to domains. 3. Only domain can be specified
originOnlyInteger
Input 0 returns all data, input 1 only returns source site data

Response parameter(s)

Body Params

NameDescription
resultList
domainString
Domain
totalTrafficString
Total traffic, Unit: MB, retain two decimals, example (74099.92)
totalRequestsString
Total requests
peakRequestsString
Peak of Requests
peakRequestsTimestampString
Peak time of Request
peakBandwidthString
Peak bandwidth, Unit: Mbps, retain two decimals, example (74099.92)
peakBandwidthTimestampString
Peak time of Bandwidth
dataSeriesList
timestampString
1. When the querying data granularity is 5m, then 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 12:05 AM, and the last one is (yyyy-MM-dd+1) 00:00. 2. Return the time slices that contained in start time and in end time.
trafficString
Traffic value: Unit: MB, retain two decimals, example (34099.92)
bandwidthString
Bandwidth value: Unit: Mbps, retain two decimals, example: (31556.21)
requestsString
Total number of requests

Error code

Error code(code)Description(message)HTTP statusSemantic
DateSpanErrorPeriod between dataFrom and dateTo is longer than 1 days400Period between dataFrom and dateTo is longer than 1 days
InternalErrorSystem has encountered an error500System has encountered an error
InvalidDatePerioddataFrom or dateTo not compliant to specifications400dataFrom or dateTo not compliant to specifications
InvalidHTTPRequestIncorrect format of request body400Incorrect format of request body
NotAcceptableAccept as request header is not supported, as interface only supports json and xml formats, with json as the default format400Accept as request header is not supported, as interface only supports json and xml formats, with json as the default format
NumberLimitExceededNumber of queried domains exceeds set limit400Number of queried domains exceeds set limit
PARAM_INVALIDParameter of granularity not compliant to specifications400Parameter of granularity not compliant to specifications
PARAM_INVALIDparam: domain is null or invalid.400param: domain is null or invalid.
PARAM_INVALIDparam: groupBy is null or invalid.400param: groupBy is null or invalid.

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/traffic-request/origin"   \
  -X "POST" \
  -H "X-Time-Zone:GMT+00:00" \
  -u "$username:$password" \
  -H "Date: $date" \
  -H "Accept: application/json" \
  -d '{
  "dateFrom": "2019-07-22T14:00:00+00:00",
  "dateTo": "2019-07-22T14:05:00+00:00",
  "domain": ["www.111.com","www.222.com"],
  "granularity": "5m",
  "groupBy": ["domain"]
  }'
Response example
Copy Copy success
{
    "result": [
        {
            "domain":"www.111.com",
            "totalTraffic": "774.67",
            "totalRequests": "25659",
            "peakBandwidth": "20.66",
            "peakBandwidthTimestamp": "2019-07-22 14:00",
            "peakRequests": "25659",
            "peakRequestsTimestamp": "2019-07-22 14:00",
            "dataSeries": [
                {
                    "timestamp": "2019-07-22 14:00",
                    "bandwidth": "20.66",
                    "traffic": "774.67",
                    "requests": "25659"
                },
                {
                    "timestamp": "2019-07-22 14:05",
                    "bandwidth": "37.17",
                    "traffic": "1394.00",
                    "requests": "25920"
                }
            ]
        },
        {
            "domain":"www.222.com",
            "totalTraffic": "774.67",
            "totalRequests": "25659",
            "peakBandwidth": "20.66",
            "peakBandwidthTimestamp": "2019-07-22 14:00",
            "peakRequests": "25659",
            "peakRequestsTimestamp": "2019-07-22 14:00",
            "dataSeries": [
                {
                    "timestamp": "2019-07-22 14:00",
                    "bandwidth": "20.66",
                    "traffic": "774.67",
                    "requests": "25659"
                },
                {
                    "timestamp": "2019-07-22 14:05",
                    "bandwidth": "53.69",
                    "traffic": "2013.33",
                    "requests": "26181"
                }
            ]
        }
    ]
}