Súhrnná história environmentálnych meraní

Vracia súhrnnú hodinovú históriu meraní environmentálnych senzorov (teplota, vlhkosť a tlak vzduchu, CO2, vietor, zrážky, pôdne veličiny a pod.) za posledný deň alebo týždeň. Hodnoty sú spriemerované za všetky aktívne (alebo zvolené) senzory, pre každú meranú veličinu zvlášť.

Vydavateľ
Kancelária prednostu, mesto Trnava

Formát
API JSON

Licencia
CC BY 4.0

Periodicita
Každú hodinu

Posledná úprava
3. 11. 2026

Stiahnuť dáta

Parametre

{
  "period": "day",
  "item": [
    "6a855c055ad61700018f2a42"
  ]
}
period – obdobie spätne od aktuálneho času: day (posledných 24 hodín), week (posledný týždeň) (povinný)
item – voliteľný zoznam ID environmentálnych senzorov; ak chýba, použijú sa všetky aktívne senzory
location – voliteľný filter umiestnenia senzorov: indoor (vnútorné), outdoor (vonkajšie); uplatní sa len ak nie je zadaný item

Požiadavka

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

Odpoveď

{
  "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 – index kvality ovzdušia (momentálne sa nepočíta, vždy null)
trend – celkový trend (momentálne vždy null)
environment – objekt, kde kľúčom je meraná veličina (napr. airTemperature, airHumidity, airPressure, airCo2, windSpeed, windDirection, rainGauge)
environment.[veličina].history – hodinová história priemerných hodnôt
environment.[veličina].history.timestamp – začiatok hodiny (ISO 8601, UTC)
environment.[veličina].history.value – priemerná hodnota za hodinu (napr. °C, %, hPa, ppm, m/s, °, mm)
environment.[veličina].trend – trend aktuálnej hodnoty v % (momentálne null)
environment.[veličina].current – aktuálna priemerná hodnota (momentálne null)

Požiadavka

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

Odpoveď

"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 – index kvality ovzdušia (momentálne sa nepočíta, vždy null)
trend – celkový trend (momentálne vždy null)
environment – objekt, kde kľúčom je meraná veličina (napr. airTemperature, airHumidity, airPressure, airCo2, windSpeed, windDirection, rainGauge)
environment.[veličina].history – hodinová história priemerných hodnôt
environment.[veličina].history.timestamp – začiatok hodiny (ISO 8601, UTC)
environment.[veličina].history.value – priemerná hodnota za hodinu (napr. °C, %, hPa, ppm, m/s, °, mm)
environment.[veličina].trend – trend aktuálnej hodnoty v % (momentálne null)
environment.[veličina].current – aktuálna priemerná hodnota (momentálne null)

Požiadavka

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

Odpoveď

<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 – index kvality ovzdušia (momentálne sa nepočíta, vždy null)
trend – celkový trend (momentálne vždy null)
environment – objekt, kde kľúčom je meraná veličina (napr. airTemperature, airHumidity, airPressure, airCo2, windSpeed, windDirection, rainGauge)
environment.[veličina].history – hodinová história priemerných hodnôt
environment.[veličina].history.timestamp – začiatok hodiny (ISO 8601, UTC)
environment.[veličina].history.value – priemerná hodnota za hodinu (napr. °C, %, hPa, ppm, m/s, °, mm)
environment.[veličina].trend – trend aktuálnej hodnoty v % (momentálne null)
environment.[veličina].current – aktuálna priemerná hodnota (momentálne null)