Smart bin fill level history
Returns the fill level history (in %) of individual smart bins with Sensoneo sensors in hourly (period=day) or daily (period=week) breakdown. For bins with more sensors, the average of the sensors is returned.
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
- API JSON Sample
- CSV Sample
- XML Sample
- API Documentation
Parameters
{
"itemId": [
"6544b644feb6f7000149dcf7",
"6544b657feb6f7000149de6b"
],
"from": "2026-10-14T00:00:00.000Z",
"to": "2026-10-14T02:59:59.999Z",
"period": "day"
}
from – interval start (ISO 8601, required)
to – interval end (ISO 8601, required)
period – day = hourly values, week = daily values (required)
itemId – array of smart bin identifiers (optional; all bins if omitted)
Request
POST https://opendata.trnava.sk/api/datasets/v2/smart-bins/items-history
Answer
[
{
"timestamp": "2026-10-14T00:00:00.000Z",
"items": [
{
"id": "6544b657feb6f7000149de6b",
"level": 30.5
},
{
"id": "6544b644feb6f7000149dcf7",
"level": 76.5
}
]
},
{
"timestamp": "2026-10-14T01:00:00.000Z",
"items": [
{
"id": "6544b644feb6f7000149dcf7",
"level": 76
},
{
"id": "6544b657feb6f7000149de6b",
"level": 29.5
}
]
},
{
"timestamp": "2026-10-14T02:00:00.000Z",
"items": [
{
"id": "6544b657feb6f7000149de6b",
"level": 29.5
},
{
"id": "6544b644feb6f7000149dcf7",
"level": 76
}
]
}
]
timestamp – start of the hour or day
items.id – smart bin identifier
items.level – bin fill level in %
Request
GET https://opendata.trnava.sk/api/datasets/v2/smart-bins/items-history?outputType=csv
Answer
"timestamp","items.0.id","items.0.level","items.1.id","items.1.level"
"2026-10-14T00:00:00.000Z","6544b657feb6f7000149de6b",30.5,"6544b644feb6f7000149dcf7",76.5
"2026-10-14T01:00:00.000Z","6544b657feb6f7000149de6b",29.5,"6544b644feb6f7000149dcf7",76
timestamp – start of the hour or day
items.id – smart bin identifier
items.level – bin fill level in %
Request
GET https://opendata.trnava.sk/api/datasets/v2/smart-bins/items-history?outputType=xml
Answer
<root>
<item>
<timestamp>2026-10-14T00:00:00.000Z</timestamp>
<items>
<item>
<id>6544b657feb6f7000149de6b</id>
<level>30.5</level>
</item>
<item>
<id>6544b644feb6f7000149dcf7</id>
<level>76.5</level>
</item>
</items>
</item>
<item>
<timestamp>2026-10-14T01:00:00.000Z</timestamp>
<items>
<item>
<id>6544b657feb6f7000149de6b</id>
<level>29.5</level>
</item>
<item>
<id>6544b644feb6f7000149dcf7</id>
<level>76</level>
</item>
</items>
</item>
<item>
<timestamp>2026-10-14T02:00:00.000Z</timestamp>
<items>
<item>
<id>6544b657feb6f7000149de6b</id>
<level>29.5</level>
</item>
<item>
<id>6544b644feb6f7000149dcf7</id>
<level>76</level>
</item>
</items>
</item>
</root>
timestamp – start of the hour or day
items.id – smart bin identifier
items.level – bin fill level in %