Documentation API Docs StatusCode Report QueryOriginStatusCodeDistribution

QueryOriginStatusCodeDistribution

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

Applicable Products

universal

API Description

Statistics of the distribution of origin status codes of multiple domains, and the statistics contain the origin data of all nodes. Around 5-15 minutes of data delay.

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; 4dateFrom 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; if it's greater than the current time, then the current time is assigned as the value;
*domainList
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.The default time span of dateFrom and dateTo is up to 7 days (you can contact technical support to adjust it to a maximum of 31 days); 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
*dataIntervalString
Data granularity, 5m: granularity of 5 minutes
*groupByList
Group dimension 1.The value can be selected is domain; 2.The data is displayed according to the specified dimension;
*backsrcOnlyObject
Optional values 0, 1. Default is 0 Input parameter 1 returns the total number of requests to the source, and 0 only returns the number of requests to the source station
*queryByString
Query dimension. Optional values: statusCode , statusCodeType. Default value is statuscode. 1.statusCode: returns the status code details; 2.statusCodeType: returns the requests of each status code type (such as the number of requests corresponding to success, redirect, not modified, permission, not found, server error, and other)

Response parameter(s)

Body Params

JSON
NameDescription
resultList
result
domainString
Domain
statusCodeTypeString
Success, Redirect, Not-Modified, Permission, Not-Found, Server Error, Other
statusCodeOriginDataList
statusCodeOriginData
statusCodeString
Status code
requestDataList
requestData
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
Number of requests of the status code

Error code

Error code(code)Description(message)HTTP statusSemantic
MissingBodyRequest body has not specified400Request body has not specified
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
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
PARAM_INVALIDParameter groupBy not compliant   to specifications400Parameter groupBy not compliant   to specifications
NumberLimitExceededNumber of specified domains   exceed upper limit400Number of specified domains   exceed upper limit
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.

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/status-code/origin" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/xml" \
-d '{
    "dateFrom":"2017-07-10T23:55:00+00:00",
    "dateTo":"2017-07-11T00:10:00+00:00",
    "domain":[
        "test1.com",
        "test2.com"
    ],
    "dataInterval":"5m",
    "groupBy":[
        "domain"
    ],
    "queryBy":"statusCode"
}'
Response example
Copy Copy success
<?xml version="1.0" encoding="utf-8"?>

<report> 

  <result> 

    <report> 

      <domain>test1.com</domain>  

      <status-code-origin-data> 

        <status-code-origin-request-data> 

          <status-code>200</status-code>  

          <request-data> 

            <detail> 

              <timestamp>2017-07-10 23:55</timestamp>  

              <value>621</value> 

            </detail>  

            <detail> 

              <timestamp>2017-07-11 00:00</timestamp>  

              <value>337</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:05</timestamp>  

              <value>185</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:10</timestamp>  

              <value>181</value> 

            </detail> 

          </request-data> 

        </status-code-origin-request-data>  

        <status-code-origin-request-data> 

          <status-code>400</status-code>  

          <request-data> 

            <detail> 

              <timestamp>2017-07-10 23:55</timestamp>  

              <value>1522</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:00</timestamp>  

              <value>337</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:05</timestamp>  

              <value>185</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:10</timestamp>  

              <value>181</value> 

            </detail> 

          </request-data> 

        </status-code-origin-request-data> 

      </status-code-origin-data> 

    </report>  

    <report> 

      <domain>test2.com</domain>  

      <status-code-origin-data> 

        <status-code-origin-request-data> 

          <status-code>200</status-code>  

          <request-data> 

            <detail> 

              <timestamp>2017-07-10 23:55</timestamp>  

              <value>1813</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:00</timestamp>  

              <value>337</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:05</timestamp>  

              <value>185</value> 

            </detail> 
            <detail> 

              <timestamp>2017-07-11 00:10</timestamp>  

              <value>181</value> 

            </detail> 

          </request-data> 

        </status-code-origin-request-data> 

      </status-code-origin-data> 

    </report> 

  </result> 

</report>