{"openapi":"3.1.0","info":{"title":"KK-OZEC data API","summary":"Measurements of the KK-OZEC monitors (ozone, weather, atmospheric electric field), read-only.","description":"Read-only access to the measurements stored on the KK-OZEC server, for approved API clients. Register at `/api/register`; the guide (`/api/docs/guide`) explains keys, scope, limits, pagination, data quality and the compatibility promise. Data licence: CC BY 4.0, attribution: \"Data: KK-OZEC monitoring network (https://www.ozec.org), CC BY 4.0\".","contact":{"name":"KK-OZEC administrator","url":"https://api.ozec.org/docs/guide"},"license":{"name":"Data: CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"version":"1.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["service"],"summary":"Liveness (no key needed, contains no data)","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/api/v1/":{"get":{"tags":["service"],"summary":"API index","operationId":"index_api_v1__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Index"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}},"/api/v1/parameters":{"get":{"tags":["metadata"],"summary":"Parameters in your key's scope","operationId":"parameters_api_v1_parameters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParameterList"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}},"/api/v1/monitors":{"get":{"tags":["metadata"],"summary":"Monitors in your key's scope","operationId":"monitors_api_v1_monitors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorList"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}},"/api/v1/monitors/{monitor_id}/latest":{"get":{"tags":["data"],"summary":"Latest value of each parameter","operationId":"latest_api_v1_monitors__monitor_id__latest_get","security":[{"ApiKey":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}},{"name":"parameters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated parameter keys; default: all in your scope.","examples":["o3_ppb,temp_c"],"title":"Parameters"},"description":"Comma-separated parameter keys; default: all in your scope."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Latest"}}},"headers":{"RateLimit":{"description":"Remaining quota per limit (IETF draft).","schema":{"type":"string"}},"RateLimit-Policy":{"description":"The limits of your key.","schema":{"type":"string"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The monitor has no stored data (unknown_monitor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/monitors/{monitor_id}/series":{"get":{"tags":["data"],"summary":"Measurements over a time span (paginated)","description":"Rows in time order, at most `limit` per page; follow `meta.next_cursor` (JSON) or the `OZEC-Next-Cursor` header (CSV) for the next page until it is null / absent. A page covers at most `limit` nominal record intervals (5 min, 1 h or 1 day), so it can hold fewer rows than `limit`, or none across a data gap: keep following the cursor. The span may not exceed your tier's maximum for the resolution. Times are UTC. `format=csv` returns the same rows as CSV (comma separator, decimal point, header row; flags separated by `;`).","operationId":"series_api_v1_monitors__monitor_id__series_get","security":[{"ApiKey":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}},{"name":"parameters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated parameter keys; default: all in your scope.","examples":["o3_ppb,temp_c"],"title":"Parameters"},"description":"Comma-separated parameter keys; default: all in your scope."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Start (ISO 8601; no offset = UTC). Default: end minus one day.","examples":["2026-11-22T00:00:00Z"],"title":"Start"},"description":"Start (ISO 8601; no offset = UTC). Default: end minus one day."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"End (ISO 8601; no offset = UTC). Default: now.","title":"End"},"description":"End (ISO 8601; no offset = UTC). Default: now."},{"name":"resolution","in":"query","required":false,"schema":{"enum":["raw","1h","1d"],"type":"string","description":"raw = every record; 1h / 1d = means over UTC hours / days.","default":"1h","title":"Resolution"},"description":"raw = every record; 1h / 1d = means over UTC hours / days."},{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv"],"type":"string","default":"json","title":"Format"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"From the previous page.","title":"Cursor"},"description":"From the previous page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Rows per page.","default":10000,"title":"Limit"},"description":"Rows per page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}},"text/csv":{"schema":{"type":"string"}}},"headers":{"RateLimit":{"description":"Remaining quota per limit (IETF draft).","schema":{"type":"string"}},"RateLimit-Policy":{"description":"The limits of your key.","schema":{"type":"string"}},"OZEC-Next-Cursor":{"description":"Cursor of the next page (CSV); absent on the last page.","schema":{"type":"string"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The monitor has no stored data (unknown_monitor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/monitors/{monitor_id}/calibrations":{"get":{"tags":["metadata"],"summary":"Calibration periods of a monitor","description":"A step in a series at a period boundary is a calibration change, not a change in the air. Series rows carry the period id in `cal`.","operationId":"calibrations_api_v1_monitors__monitor_id__calibrations_get","security":[{"ApiKey":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calibrations"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The monitor has no stored data (unknown_monitor).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/v1/usage":{"get":{"tags":["service"],"summary":"Your limits and today's usage","description":"Does not count against your per-minute or daily request quota.","operationId":"usage_api_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"Bad request (unknown parameter, bad time, key in the URL, ...).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, invalid, revoked or expired key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Outside your key's scope, or the client is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A limit of your key was reached; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Paused for maintenance, or the server-wide limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"ApiKey":[]}]}}},"components":{"schemas":{"CalPeriod":{"properties":{"id":{"type":"integer","title":"Id","description":"Matches `cal` in series rows."},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start","description":"Start (UTC); null = since the first record."},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End","description":"End (UTC); null = still current."},"change":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change","description":"What changed at the start of this period; null for period 0."},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["id","start","end","change","detail"],"title":"CalPeriod"},"Calibrations":{"properties":{"monitor":{"type":"string","title":"Monitor"},"periods":{"items":{"$ref":"#/components/schemas/CalPeriod"},"type":"array","title":"Periods"}},"type":"object","required":["monitor","periods"],"title":"Calibrations"},"Description":{"properties":{"en":{"type":"string","title":"En"},"de":{"type":"string","title":"De"}},"type":"object","required":["en","de"],"title":"Description"},"Health":{"properties":{"status":{"type":"string","const":"ok","title":"Status"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","version"],"title":"Health"},"Index":{"properties":{"api":{"type":"string","title":"Api","description":"API name."},"version":{"type":"string","title":"Version","description":"Semantic version of the v1 contract."},"docs":{"type":"string","title":"Docs"},"openapi":{"type":"string","title":"Openapi"},"licence":{"type":"string","title":"Licence"},"licence_url":{"type":"string","title":"Licence Url"},"attribution":{"type":"string","title":"Attribution"},"endpoints":{"additionalProperties":{"type":"string"},"type":"object","title":"Endpoints"}},"type":"object","required":["api","version","docs","openapi","licence","licence_url","attribution","endpoints"],"title":"Index"},"Latest":{"properties":{"monitor":{"type":"string","title":"Monitor"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time","description":"Time of the latest record (UTC)."},"flags":{"items":{"type":"string"},"type":"array","title":"Flags","description":"Fault flags of the latest record that concern the returned parameters. Open list: ignore values you do not know."},"values":{"additionalProperties":{"$ref":"#/components/schemas/LatestValue"},"type":"object","title":"Values"},"licence":{"type":"string","title":"Licence"},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["monitor","time","flags","values","licence","attribution"],"title":"Latest"},"LatestValue":{"properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"time":{"type":"string","title":"Time"},"time_quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Quality"}},"type":"object","required":["value","time","time_quality"],"title":"LatestValue"},"Location":{"properties":{"lat":{"type":"number","title":"Lat"},"lon":{"type":"number","title":"Lon"},"precision_dp":{"type":"integer","title":"Precision Dp","description":"Decimals kept (3 ≈ 100 m). The published position is rounded."},"radius_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Radius M","description":"The monitor is somewhere within this distance of the point (the operator publishes an approximate point, never the exact position). Since 1.1.0."}},"type":"object","required":["lat","lon","precision_dp"],"title":"Location"},"Monitor":{"properties":{"id":{"type":"string","title":"Id","description":"Monitor id (as in the web app: 'Monitor 1').","examples":["1"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"location":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"type":"null"}]},"height_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height M","description":"Sensor height above ground, m."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"parameters":{"items":{"type":"string"},"type":"array","title":"Parameters","description":"Parameters of this monitor in your key's scope."},"active_since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Since"},"last_record":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Record","description":"Time of the latest stored record (UTC)."}},"type":"object","required":["id","name","location","height_m","note","parameters","active_since","last_record"],"title":"Monitor"},"MonitorList":{"properties":{"monitors":{"items":{"$ref":"#/components/schemas/Monitor"},"type":"array","title":"Monitors"},"licence":{"type":"string","title":"Licence"},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["monitors","licence","attribution"],"title":"MonitorList"},"Parameter":{"properties":{"key":{"type":"string","title":"Key","description":"Permanent parameter key: never renamed or reused. It carries the unit.","examples":["o3_ppb"]},"unit":{"type":"string","title":"Unit"},"decimals":{"type":"integer","title":"Decimals","description":"Decimals that are meaningful for display."},"sensor":{"type":"string","title":"Sensor"},"accuracy":{"type":"string","title":"Accuracy"},"description":{"$ref":"#/components/schemas/Description"}},"type":"object","required":["key","unit","decimals","sensor","accuracy","description"],"title":"Parameter"},"ParameterList":{"properties":{"parameters":{"items":{"$ref":"#/components/schemas/Parameter"},"type":"array","title":"Parameters"},"licence":{"type":"string","title":"Licence"},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["parameters","licence","attribution"],"title":"ParameterList"},"Problem":{"properties":{"type":{"type":"string","title":"Type","description":"Link to the error's explanation in the guide."},"title":{"type":"string","title":"Title"},"status":{"type":"integer","title":"Status"},"detail":{"type":"string","title":"Detail"},"code":{"type":"string","title":"Code","description":"Stable machine-readable error code (see the guide); new codes may be added."},"limit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Limit","description":"For rate_limited / server_busy: which limit (minute, day, rows, concurrent, global)."}},"type":"object","required":["type","title","status","detail","code"],"title":"Problem","description":"RFC 9457 problem details (media type application/problem+json)."},"Series":{"properties":{"meta":{"$ref":"#/components/schemas/SeriesMeta"},"data":{"items":{"type":"object"},"type":"array","title":"Data","description":"One object per row: `time` (UTC), `time_quality` (raw only: received, synced, offset, stale, none), one member per requested parameter (null = no value), `flags` (open list), `cal` (calibration period id), and for 1h/1d `n` (records in the hour / hours in the day). Unknown members may be added: ignore them.","examples":[[{"cal":1,"flags":[],"n":12,"o3_ppb":31.4,"temp_c":12.1,"time":"2026-11-22T13:00:00Z"}]]}},"type":"object","required":["meta","data"],"title":"Series"},"SeriesMeta":{"properties":{"monitor":{"type":"string","title":"Monitor"},"resolution":{"type":"string","enum":["raw","1h","1d"],"title":"Resolution"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"},"parameters":{"items":{"type":"string"},"type":"array","title":"Parameters"},"units":{"additionalProperties":{"type":"string"},"type":"object","title":"Units"},"rows":{"type":"integer","title":"Rows"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor` to get the next page; null on the last page."},"time_label":{"type":"string","title":"Time Label","description":"raw: the record's time; 1h and 1d: the START of the UTC window."},"licence":{"type":"string","title":"Licence"},"attribution":{"type":"string","title":"Attribution"}},"type":"object","required":["monitor","resolution","start","end","parameters","units","rows","next_cursor","time_label","licence","attribution"],"title":"SeriesMeta"},"Usage":{"properties":{"client":{"type":"string","title":"Client"},"tier":{"type":"string","title":"Tier"},"limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Limits"},"today":{"additionalProperties":{"type":"integer"},"type":"object","title":"Today"},"scope":{"type":"object","title":"Scope"},"key_id":{"type":"string","title":"Key Id"},"expires":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires"}},"type":"object","required":["client","tier","limits","today","scope","key_id","expires"],"title":"Usage"}},"securitySchemes":{"ApiKey":{"type":"http","description":"Your API key: `Authorization: Bearer ozec_xxxxxxxx_...`. Never put it in a URL.","scheme":"bearer"}}}}