Skip to content
Myra Online Help Updated · 21 Aug 2026

Running a statistics query for domains and subdomains

Note

If type is set to fqdn, each entry of fqdn must resolve to a domain to which the authenticated user has read access, and their number must not exceed the configured domain limit, otherwise the request fails with a validation error.

Sends a POST request to the endpoint /statistic/query.

Description

The Statistic-Query request runs a statistics query for a specific period and returns the requested data sources aggregated by the matching domains, subdomains, or FQDNs.

Requirements

Values of the request: none Objects: StatisticVO

Request

To run a statistics query, the object query StatisticVO must be added to the body of the request. The attribute query is a nested StatisticQueryVO object with the following attributes:

Attributes Description Values
startDate The start of the aggregation interval. string($date-time)
endDate The end of the aggregation interval. The difference between startDate and endDate must not exceed 7952399 seconds (about 92 days). string($date-time)
dataSources A map from arbitrary data set names to the requested data source and output type, in the form {\"<name>\": {\"source\": \"<sourceName>\", \"type\": \"<outputType>\"}}. At least one entry is required. sourceName is one of the values requests, requests_total, requests_ssl, requests_nonssl, requests_blocked, requests_blocked_reason, requests_cached, requests_cached_ssl, requests_cached_nonssl, requests_uncached, requests_uncached_ssl, requests_uncached_nonssl, bytes, bytes_ssl, bytes_nonssl, bytes_cached, bytes_cached_ssl, bytes_cached_nonssl, bytes_uncached, bytes_uncached_ssl, bytes_uncached_nonssl, response_codes, country_codes, requests_cache_hits, requests_blocked_hits, requests_cache_hits_ssl, requests_cache_hits_nonssl, bytes_cache_hits, bytes_cache_hits_ssl, bytes_cache_hits_nonssl, or upstream_performance. outputType is stats or histogram. object

The following attributes are optional:

Attributes Description Values
fqdn A list of domain names that are aggregated. Only used if type is set to fqdn. array of string
aggregationInterval The aggregation interval used for histogram data sources.
  • 2m
  • hour
  • day
  • week
  • month
  • year
type Defines for which domains the statistics are created.
  • all
  • own
  • foreign
  • fqdn

The system returns the object StatisticVO, whose attribute result contains the aggregated data for each requested entry of dataSources.

Example

Example request body:

{
  "query": {
    "startDate": "2026-01-01T00:00:00+00:00",
    "endDate": "2026-01-01T00:00:00+00:00",
    "dataSources": {},
    "fqdn": [
      "string"
    ],
    "aggregationInterval": "day",
    "type": "fqdn"
  }
}

Responses

The following responses are available:

STATUS CODE DESCRIPTION
200 The request has succeeded.
400 The request was unsuccessful. The request was invalid or information is missing.
401 The request has not succeeded because the user authentication was incorrect.
403 The request has not succeeded because the user does not have the right permissions.