v1

latestOpenAPI 3.0.02026-07-176611.9 KB

Get statistical values for specified time intervals.

The parameters geoframe, country, polygon and point are mutually exclusive. Providing one of these parameters is mandatory.

get/api/v2/{product}/statistics.json

Path parameters

productstring required

Query parameters

geoframenumber[]

Defines an area from which measurements included in the response are taken.

The parameter is an array in the form lon1,lat1,lon2,lat2, representing the upper left and lower right corners of a rectangle.

countrystring

Specifies a bounding box of the specified country from which measurements included in the response are taken.

The country is selected using an ISO-3166, two-letter or three-letter country code .

polygonnumber[]

Defines an area from which measurements included in the response are taken.

The parameter is an array in the form lon1,lat1,lon2,lat2,…. Every value pair represents a vertex of longitude and latitude. The polygon is then defined as the line segments of the consecutive vertices.

If the first and last vertices do not match, the first vertex is automatically appended to close the polygon.

pointnumber[]

Defines a single point in the form longitude,latitude. The nearest point in the grid is used for calculations.

interval'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year' | 'decade' | 'century'

Specify the time interval length for which data is being aggregated. Defaults to day.

beginstring

Defines an inclusive lower bound for measurements included in the response.

In regards of time filtering, the set of measurements considered in a response is defined as { measurement | begin ≤ measurement.time < end }.

endstring

Defines a non-inclusive upper bound for measurements included in the response.

In regards of time filtering, the set of measurements considered in a response is defined as { measurement | begin ≤ measurement.time < end }.

limitinteger

Limit number of returned items.

offsetinteger

Specify the offset of the first item to return.

Response

Array of statistical data about the chosen product for specified intervals.

Example response

[
  {
    "value": {
      "count": 100,
      "average": 0.0312481193586528,
      "standard deviation": 0.0123,
      "min": 0.02,
      "max": 0.04
    },
    "time": {
      "min": "2019-02-10T13:05:08.812000Z",
      "max": "2019-02-10T13:03:40.254000Z",
      "interval_start": "2019-02-10T00:00:00Z"
    }
  }
]