Photovoltaic plant electricity production – history

Returns historical electricity production data (kWh) for a selected municipal photovoltaic plant in Trnava. With period "day" the data are aggregated hourly, with other periods daily.

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

{
  "itemId": "654a4dc16290fa00010a0c28",
  "from": "2026-10-13T07:00:00.000Z",
  "to": "2026-10-13T10:59:59.999Z",
  "period": "day"
}
itemId – photovoltaic plant identifier (required, 24-character hexadecimal string), e.g. 654a4dc16290fa00010a0c28 = ZŠ Maxima Gorkého 21
from – start of the time interval, ISO 8601 (required)
to – end of the time interval, ISO 8601 (required)
period – data granularity: day (hourly values), week, month, year (daily values); daily values by default

Request

POST https://opendata.trnava.sk/api/datasets/v2/smart-metering/measurement-history

Answer

[
  {
    "consumption": 0,
    "power": null,
    "production": 14.03,
    "timestamp": "2026-10-13T07:00:00.000Z"
  },
  {
    "consumption": 0,
    "power": null,
    "production": 23.65,
    "timestamp": "2026-10-13T08:00:00.000Z"
  },
  {
    "consumption": 0,
    "power": null,
    "production": 28.95,
    "timestamp": "2026-10-13T09:00:00.000Z"
  },
  {
    "consumption": 0,
    "power": null,
    "production": 31.27,
    "timestamp": "2026-10-13T10:00:00.000Z"
  }
]
timestamp – start of the aggregation interval (hour, or day starting at local midnight), ISO 8601 UTC
production – electricity produced in the interval (kWh)
consumption – consumption in the interval (0 for photovoltaic plants)
power – power (not provided for Trnava photovoltaic plants, null)

Request

GET https://opendata.trnava.sk/api/datasets/v2/smart-metering/measurement-history?outputType=csv

Answer

"consumption","power","production","timestamp"
0,,14.03,"2026-10-13T07:00:00.000Z"
0,,23.65,"2026-10-13T08:00:00.000Z"
timestamp – start of the aggregation interval (hour, or day starting at local midnight), ISO 8601 UTC
production – electricity produced in the interval (kWh)
consumption – consumption in the interval (0 for photovoltaic plants)
power – power (not provided for Trnava photovoltaic plants, null)

Request

GET https://opendata.trnava.sk/api/datasets/v2/smart-metering/measurement-history?outputType=xml

Answer

<root><item><consumption>0</consumption><power></power><production>14.03</production><timestamp>2026-10-13T07:00:00.000Z</timestamp></item><item><consumption>0</consumption><power></power><production>23.65</production><timestamp>2026-10-13T08:00:00.000Z</timestamp></item><item><consumption>0</consumption><power></power><production>28.95</production><timestamp>2026-10-13T09:00:00.000Z</timestamp></item><item><consumption>0</consumption><power></power><production>31.27</production><timestamp>2026-10-13T10:00:00.000Z</timestamp></item></root>
timestamp – start of the aggregation interval (hour, or day starting at local midnight), ISO 8601 UTC
production – electricity produced in the interval (kWh)
consumption – consumption in the interval (0 for photovoltaic plants)
power – power (not provided for Trnava photovoltaic plants, null)