Environmental Measurements – Total History

Returns the summary hourly measurement history of environmental sensors (air temperature, humidity and pressure, CO2, wind, precipitation, soil quantities etc.) for the last day or week. Values are averaged across all active (or selected) sensors, separately for each measured quantity.

Publisher
Chief Executive's Office, City of Trnava

Format
API JSON

License
CC BY 4.0

Update frequency
Hourly

Last modified
3. 11. 2026

Download data

Parameters

{
  "period": "day",
  "item": [
    "6a855c055ad61700018f2a42"
  ]
}
period – period back from the current time: day (last 24 hours), week (last week) (required)
item – optional list of environmental sensor IDs; if omitted, all active sensors are used
location – optional sensor location filter: indoor, outdoor; applied only when item is not specified

Request

POST https://opendata.trnava.sk/api/datasets/v2/environment-monitoring/history-total

Answer

{
  "aqi": null,
  "trend": null,
  "environment": {
    "airTemperature": {
      "history": [
        {
          "timestamp": "2026-10-14T13:00:00.000Z",
          "value": 16.8
        },
        {
          "timestamp": "2026-10-14T14:00:00.000Z",
          "value": 15.8
        },
        {
          "timestamp": "2026-10-14T15:00:00.000Z",
          "value": 13.95
        }
      ],
      "trend": null,
      "current": null
    },
    "airHumidity": {
      "history": [
        {
          "timestamp": "2026-10-14T13:00:00.000Z",
          "value": 52.5
        },
        {
          "timestamp": "2026-10-14T14:00:00.000Z",
          "value": 59
        },
        {
          "timestamp": "2026-10-14T15:00:00.000Z",
          "value": 61.5
        }
      ],
      "trend": null,
      "current": null
    },
    "windDirection": {
      "history": [
        {
          "timestamp": "2026-10-14T13:00:00.000Z",
          "value": 151
        },
        {
          "timestamp": "2026-10-14T14:00:00.000Z",
          "value": 162.8
        },
        {
          "timestamp": "2026-10-14T15:00:00.000Z",
          "value": 162.3
        }
      ],
      "trend": null,
      "current": null
    },
    "airPressure": {
      "history": [
        {
          "timestamp": "2026-10-14T13:00:00.000Z",
          "value": 1009.6
        },
        {
          "timestamp": "2026-10-14T14:00:00.000Z",
          "value": 1009.4
        },
        {
          "timestamp": "2026-10-14T15:00:00.000Z",
          "value": 1009.8
        }
      ],
      "trend": null,
      "current": null
    },
    "windSpeed": {
      "history": [
        {
          "timestamp": "2026-10-14T13:00:00.000Z",
          "value": 0.8
        },
        {
          "timestamp": "2026-10-14T14:00:00.000Z",
          "value": 0.3
        },
        {
          "timestamp": "2026-10-14T15:00:00.000Z",
          "value": 0.35
        }
      ],
      "trend": null,
      "current": null
    },
    "rainGauge": {
      "history": [
        {
          "timestamp": "2026-10-14T13:00:00.000Z",
          "value": 0
        },
        {
          "timestamp": "2026-10-14T14:00:00.000Z",
          "value": 0
        },
        {
          "timestamp": "2026-10-14T15:00:00.000Z",
          "value": 0
        }
      ],
      "trend": null,
      "current": null
    }
  }
}
aqi – air quality index (currently not calculated, always null)
trend – overall trend (currently always null)
environment – object keyed by measured quantity (e.g. airTemperature, airHumidity, airPressure, airCo2, windSpeed, windDirection, rainGauge)
environment.[measurement].history – hourly history of average values
environment.[measurement].history.timestamp – start of the hour (ISO 8601, UTC)
environment.[measurement].history.value – hourly average value (e.g. °C, %, hPa, ppm, m/s, °, mm)
environment.[measurement].trend – trend of the current value in % (currently null)
environment.[measurement].current – current average value (currently null)

Request

GET https://opendata.trnava.sk/api/datasets/v2/environment-monitoring/history-total?outputType=csv

Answer

"aqi","trend","environment.airTemperature.history.0.timestamp","environment.airTemperature.history.0.value","environment.airTemperature.history.1.timestamp","environment.airTemperature.history.1.value","environment.airTemperature.history.2.timestamp","environment.airTemperature.history.2.value","environment.airTemperature.history.3.timestamp","environment.airTemperature.history.3.value","environment.airTemperature.history.4.timestamp","environment.airTemperature.history.4.value","environment.airTemperature.history.5.timestamp","environment.airTemperature.history.5.value","environment.airTemperature.history.6.timestamp","environment.airTemperature.history.6.value","environment.airTemperature.history.7.timestamp","environment.airTemperature.history.7.value","environment.airTemperature.history.8.timestamp","environment.airTemperature.history.8.value","environment.airTemperature.history.9.timestamp","environment.airTemperature.history.9.value","environment.airTemperature.history.10.timestamp","environment.airTemperature.history.10.value","environment.airTemperature.history.11.timestamp","environment.airTemperature.history.11.value","environment.airTemperature.history.12.timestamp","environment.airTemperature.history.12.value","environment.airTemperature.history.13.timestamp","environment.airTemperature.history.13.value"
,,"2026-10-14T13:00:00.000Z",16.8,"2026-10-14T14:00:00.000Z",15.8,"2026-10-14T15:00:00.000Z",13.95,"2026-10-14T16:00:00.000Z",11.8,"2026-10-14T17:00:00.000Z",10.8,"2026-10-14T18:00:00.000Z",9.75,"2026-10-14T19:00:00.000Z",8.5,"2026-10-14T20:00:00.000Z",8.5,"2026-10-14T21:00:00.000Z",7.85,"2026-10-14T22:00:00.000Z",7.1,"2026-10-14T23:00:00.000Z",6.7,"2026-10-15T00:00:00.000Z",6.5,"2026-10-15T01:00:00.000Z",5.6,"2026-10-15T02:00:00.000Z",5.6
aqi – air quality index (currently not calculated, always null)
trend – overall trend (currently always null)
environment – object keyed by measured quantity (e.g. airTemperature, airHumidity, airPressure, airCo2, windSpeed, windDirection, rainGauge)
environment.[measurement].history – hourly history of average values
environment.[measurement].history.timestamp – start of the hour (ISO 8601, UTC)
environment.[measurement].history.value – hourly average value (e.g. °C, %, hPa, ppm, m/s, °, mm)
environment.[measurement].trend – trend of the current value in % (currently null)
environment.[measurement].current – current average value (currently null)

Request

GET https://opendata.trnava.sk/api/datasets/v2/environment-monitoring/history-total?outputType=xml

Answer

<root>
  <aqi />
  <trend />
  <environment>
    <airTemperature>
      <history>
        <item>
          <timestamp>2026-10-14T13:00:00.000Z</timestamp>
          <value>16.8</value>
        </item>
        <item>
          <timestamp>2026-10-14T14:00:00.000Z</timestamp>
          <value>15.8</value>
        </item>
        <item>
          <timestamp>2026-10-14T15:00:00.000Z</timestamp>
          <value>13.95</value>
        </item>
      </history>
      <trend>NaN</trend>
      <current>NaN</current>
    </airTemperature>
    <airHumidity>
      <history>
        <item>
          <timestamp>2026-10-14T13:00:00.000Z</timestamp>
          <value>52.5</value>
        </item>
        <item>
          <timestamp>2026-10-14T14:00:00.000Z</timestamp>
          <value>59</value>
        </item>
        <item>
          <timestamp>2026-10-14T15:00:00.000Z</timestamp>
          <value>61.5</value>
        </item>
      </history>
      <trend>NaN</trend>
      <current>NaN</current>
    </airHumidity>
    <windDirection>
      <history>
        <item>
          <timestamp>2026-10-14T13:00:00.000Z</timestamp>
          <value>151</value>
        </item>
        <item>
          <timestamp>2026-10-14T14:00:00.000Z</timestamp>
          <value>162.8</value>
        </item>
        <item>
          <timestamp>2026-10-14T15:00:00.000Z</timestamp>
          <value>162.3</value>
        </item>
      </history>
      <trend>NaN</trend>
      <current>NaN</current>
    </windDirection>
    <airPressure>
      <history>
        <item>
          <timestamp>2026-10-14T13:00:00.000Z</timestamp>
          <value>1009.6</value>
        </item>
        <item>
          <timestamp>2026-10-14T14:00:00.000Z</timestamp>
          <value>1009.4</value>
        </item>
        <item>
          <timestamp>2026-10-14T15:00:00.000Z</timestamp>
          <value>1009.8</value>
        </item>
      </history>
      <trend>NaN</trend>
      <current>NaN</current>
    </airPressure>
    <windSpeed>
      <history>
        <item>
          <timestamp>2026-10-14T13:00:00.000Z</timestamp>
          <value>0.8</value>
        </item>
        <item>
          <timestamp>2026-10-14T14:00:00.000Z</timestamp>
          <value>0.3</value>
        </item>
        <item>
          <timestamp>2026-10-14T15:00:00.000Z</timestamp>
          <value>0.35</value>
        </item>
      </history>
      <trend>NaN</trend>
      <current>NaN</current>
    </windSpeed>
    <rainGauge>
      <history>
        <item>
          <timestamp>2026-10-14T13:00:00.000Z</timestamp>
          <value>0</value>
        </item>
        <item>
          <timestamp>2026-10-14T14:00:00.000Z</timestamp>
          <value>0</value>
        </item>
        <item>
          <timestamp>2026-10-14T15:00:00.000Z</timestamp>
          <value>0</value>
        </item>
      </history>
      <trend>NaN</trend>
      <current>NaN</current>
    </rainGauge>
  </environment>
</root>
aqi – air quality index (currently not calculated, always null)
trend – overall trend (currently always null)
environment – object keyed by measured quantity (e.g. airTemperature, airHumidity, airPressure, airCo2, windSpeed, windDirection, rainGauge)
environment.[measurement].history – hourly history of average values
environment.[measurement].history.timestamp – start of the hour (ISO 8601, UTC)
environment.[measurement].history.value – hourly average value (e.g. °C, %, hPa, ppm, m/s, °, mm)
environment.[measurement].trend – trend of the current value in % (currently null)
environment.[measurement].current – current average value (currently null)