Entwickler

API-Referenz

Messwerte

Der Verlauf eines Sensors — roh, 5-minütig, stündlich oder täglich — und das Mittel einer Gruppe von Sensoren.

Messwerte eines Sensors

GEThttps://api.atmy.ai/v1/sensors/{id}/readings

Rohwerte oder 5-Minuten-Mittel (interval=5min) der letzten 31 Tage, bis 7 Tage pro Anfrage, oder Stundenmittel (interval=hour) der letzten 366 Tage, bis 92 Tage pro Anfrage, oder Tagesmittel (interval=day) mit der Prüfung jedes Tages, bis ein Jahr pro Anfrage

Pfadparameter

id string erforderlich

Sensor-ID wie in der Sensorliste.

Abfrageparameter

interval string optional

raw, 5min, hour oder day.

Standard: raw

from string optional

Beginn, ISO 8601 oder Unix-Sekunden, UTC.

to string optional

Ende, ISO 8601 oder Unix-Sekunden, UTC; standardmäßig jetzt.

GET/sensors/41504/readings?interval=day
curl "https://api.atmy.ai/v1/sensors/41504/readings?interval=day"
200Antwort
{
  "api_version": "2.0",
  "sensor_id": 41504,
  "interval": "day",
  "from": "2026-10-24T00:00:00+00:00",
  "to": "2026-10-26T00:00:00+00:00",
  "readings": [
    {
      "time": "2026-10-24T00:00:00+00:00",
      "readings": 96,
      "pm1": 21.26,
      "pm25": 32.51,
      "pm10": 36.47,
      "temperature_c": 17.01,
      "humidity_percent": 44.66,
      "quality": {
        "status": "good",
        "pm_eligible": true,
        "rating": 10
      }
    },
    {
      "time": "2026-10-25T00:00:00+00:00",
      "readings": 96,
      "pm1": 35.5,
      "pm25": 59.98,
      "pm10": 71.05,
      "temperature_c": 14.87,
      "humidity_percent": 55.7,
      "quality": {
        "status": "good",
        "pm_eligible": true,
        "rating": 10
      }
    }
  ],
  "attribution": "Sensor data: Atmy (atmy.ai), from the networks named in each sensor's \"network\", under that network's license.",
  "terms": "https://atmy.ai/legal/data/"
}

Mittel einer Gruppe von Sensoren

GEThttps://api.atmy.ai/v1/sensors/readings

Das Mittel von bis zu 100 Sensoren (ids=1,2,3) je 5 Minuten oder je Stunde, jeder Sensor zählt einmal, je Tag (interval=day) bis 92 Tage pro Anfrage

Abfrageparameter

ids string erforderlich

Sensor-IDs durch Kommas getrennt, 1 bis 100.

interval string optional

5min, hour oder day.

Standard: hour

from string optional

Beginn, ISO 8601 oder Unix-Sekunden, UTC.

to string optional

Ende, ISO 8601 oder Unix-Sekunden, UTC; standardmäßig jetzt.

GET/sensors/readings?ids=41504,41752,43057&interval=hour
curl "https://api.atmy.ai/v1/sensors/readings?ids=41504,41752,43057&interval=hour"
200Antwort
{
  "api_version": "2.0",
  "sensor_ids": [
    41504,
    41752,
    43057
  ],
  "interval": "hour",
  "from": "2026-10-26T00:00:00+00:00",
  "to": "2026-10-26T02:00:00+00:00",
  "readings": [
    {
      "time": "2026-10-26T00:00:00+00:00",
      "sensors": 3,
      "readings": 12,
      "pm1": 41.04,
      "pm25": 68.88,
      "pm10": 81.14,
      "temperature_c": 15.53,
      "humidity_percent": 54.33,
      "tvoc": 279.55
    },
    {
      "time": "2026-10-26T01:00:00+00:00",
      "sensors": 3,
      "readings": 12,
      "pm1": 37.93,
      "pm25": 62.65,
      "pm10": 76.3,
      "temperature_c": 15.55,
      "humidity_percent": 55.33,
      "tvoc": 178.2
    }
  ],
  "attribution": "Sensor data: Atmy (atmy.ai), from the networks named in each sensor's \"network\", under that network's license.",
  "terms": "https://atmy.ai/legal/data/"
}