Documentation API Docs Flow Report QueryTrafficBySpecificProtocol

QueryTrafficBySpecificProtocol

Update time: 2026-07-13 15:49:03

Applicable Products

universal

API Description

This API is used to query the Traffic data of multiple domain under the specified transmission protocol. The query is for the data of all Edge node. The user needs to specify the domain, start and end time, transmission protocol and other parameters, and can select the data granularity and grouping dimension. By default, the query will return the Traffic data of the HTTPS protocol, and the output result is the Traffic value of each domain at different time points. This interface is suitable for scenarios where you need to query and analyze the Traffic of multiple domain with different transmission protocols.

Call frequency

Single user trigger frequency: 300/5min

Request parameter(s)

Body Params

JSON
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.Must be a time that is 183 days earlier than the current time, and the time must be earlier than the current time and dateTo; 3.Period between dataFrom and dateTo cannot be longer than 7 days(technical support can be contacted to adjust); 4.dateFrom and dateTo can be either both are specified or neither is specifies; 5.If neither dateFrom nor dateTo is specified, then by default, data in the last 24 hour is queried
*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;
*domainList
Domain names, domain number limits can be adjusted depending on different accounts. The default value is 20
*dataIntervalString
Data granularity: Support for 1m(1 minutes), 5m (5 minutes), 1h (1 hour), 1d (1 day)
*protocolTypeString
Transmission protocol: 1.Options: http, https; 2.https is used as the default value is no value specified; 3.httpFlowData is displayed if http is queried, and httpsFlowData is displayed if https is queried;
*groupByList
Group dimension: 1.The value can be selected is domain; 2.The data is displayed according to the specified dimension;

Response parameter(s)

Body Params

JSON
NameDescription
resultList
result
domainString
Domain
httpsFlowDataList
timestampString
DateTime: 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.
valueString
Traffic unit is MB and 2 digits of decimals allowed

Error code

Error code(code)Description(message)HTTP statusSemantic
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
MissingBodyRequest body has not specified400Request body has not specified
InvalidHTTPRequestIncorrect format of request body400Incorrect format of request body
InvalidDatePerioddataFrom or dateTo not compliant   to specifications400dataFrom or dateTo not compliant   to specifications
DateSpanErrorPeriod between dataFrom and   dateTo is longer than 7 days400Period between dataFrom and   dateTo is longer than 7 days
NumberLimitExceededNumber of queried domains exceeds   limits set to the account400Number of queried domains exceeds   limits set to the account
PARAM_INVALIDParameter groupBy not compliant   to specifications400Parameter groupBy not compliant   to specifications
InternalErrorSystem has encountered an error500System has encountered an error
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 protocolType does not comply with the specification400Parameter protocolType does not comply with the specification

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/flow/protocol" \
-X "POST" \
-H "X-Time-Zone:GMT+00:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-d '{
    "dateFrom":"2017-07-05T00:00:00+00:00",
    "dateTo":"2017-07-05T23:00:00+00:00",
    "domain":[
        "test.com"
    ],
    "dataInterval":"5m",
    "protocolType":"https",
    "groupBy":[
        "domain"
    ]
}'
Response example
Copy Copy success
<?xml   version="1.0" encoding="utf-8"?>
  <report> 
    <result> 
      <report> 
          <domain>test.com</domain>  
        <https-flow-data> 
          <detail> 
            <timestamp>2017-07-05   00:00</timestamp>  
              <value>0.00</value> 
          </detail>  
          <detail> 
            <timestamp>2017-07-05   00:05</timestamp>  
              <value>0.00</value> 
          </detail>  
        </https-flow-data> 
      </report> 
    </result> 
  </report>