Documentation API Docs Request Report QueryRequestBySpecificProtocol

QueryRequestBySpecificProtocol

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

Applicable Products

universal

API Description

This interface is used to count the number of requests for a specified transport protocol on edge nodes for multiple domain names. Users need to provide a query time range and a domain name list, and select a protocol type. The returned content includes the number of requests for each domain name with a specified protocol. This interface helps users monitor and analyze traffic under different transport protocols to optimize network performance and improve service quality.

Call frequency

Single user trigger frequency: 2000/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: 1m , 5m, support 5m
*protocolTypeString
Transmission protocol 1.Options: http, https; 2.https is used as the default value is no value specified; 3.httpRequestData is displayed if http is queried, and httpsRequestData 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
domainString
Domain
httpsRequestDataList
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.
valueString
Total number of requests

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_INVALIDparam: domain is null or invalid.400param: domain is null or invalid.
PARAM_INVALIDparam: dataInterval is null or invalid.400param: dataInterval is null or invalid.
PARAM_INVALIDparam: protocolType is null or invalid.400param: protocolType is null or invalid.

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/request/protocol" \
  -X "POST" \
-H "X-Time-Zone:GMT+00:00" \
  -u "$username:$password" \
  -H "Date: $date" \
  -H "Accept: application/json" \
  -d '{
        "dateFrom":"2017-09-20T16:52:16+00:00",
        "dateTo":"2017-09-20T16:52:16+00:00",
      "domain":[
          "test.com"
      ],
        "dataInterval":"5m",
        "protocolType":"https",
      "groupBy":[
          "domain"
      ]
  }'
Response example
Copy Copy success
{
      "result":[
          {
                "domain":"test.com",
                "httpsRequestData":[
                  {
                        "timestamp":"2017-07-10 00:00",
                        "value":"100"
                  },
                  {
                        "timestamp":"2017-07-10 00:05",
                        "value":"200"
                  },
                  {
                        "timestamp":"2017-07-10 23:55",
                        "value":"100"
                  }
              ]
          }
      ]
  }