{
  "openapi": "3.1.0",
  "info": {
    "title": "Florix Status",
    "version": "1.0.0",
    "description": "Erreichbarkeit der Dienste, Schnittstellen, der Datenbank und des Assistenten von Florix. Öffentlich, nur lesend, ohne Daten der Organisationen, ohne interne Adressen. Der Verlauf umfasst 24 Stunden und liegt im Arbeitsspeicher des Dienstes; nach dessen Neustart beginnt er neu."
  },
  "paths": {
    "/florix/status/v1/stand": {
      "get": {
        "operationId": "stand",
        "summary": "Gesamtlage und Stand je Ziel mit Verlauf",
        "responses": {
          "200": {
            "description": "aktueller Stand",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stand" } } }
          }
        }
      }
    },
    "/florix/status/v1/openapi.json": {
      "get": {
        "operationId": "beschreibung",
        "summary": "Diese Beschreibung",
        "responses": { "200": { "description": "OpenAPI 3.1", "content": { "application/json": {} } } }
      }
    }
  },
  "components": {
    "schemas": {
      "Stand": {
        "type": "object",
        "required": ["stand", "zeit", "abschnitt_sekunden", "verlauf_beginn", "ziele"],
        "properties": {
          "stand": { "type": "string", "enum": ["ok", "teilweise", "ausfall", "unbekannt"], "description": "ok: alle Ziele erreichbar; teilweise: mindestens eines nicht; ausfall: keines; unbekannt: noch nicht alle geprüft" },
          "zeit": { "type": "string", "format": "date-time" },
          "abschnitt_sekunden": { "type": "integer", "description": "Länge eines Abschnitts im Verlauf" },
          "verlauf_beginn": { "type": "string", "format": "date-time" },
          "ziele": { "type": "array", "items": { "$ref": "#/components/schemas/Ziel" } }
        }
      },
      "Ziel": {
        "type": "object",
        "required": ["id", "name", "gruppe", "stand", "seit", "geprueft", "antwort_ms", "verfuegbar_24h", "verlauf"],
        "properties": {
          "id": { "type": "string" },
          "name": { "type": "string" },
          "gruppe": { "type": "string" },
          "stand": { "type": "string", "enum": ["ok", "ausfall", "unbekannt"] },
          "seit": { "type": ["string", "null"], "format": "date-time", "description": "seit wann der Stand gilt" },
          "geprueft": { "type": ["string", "null"], "format": "date-time", "description": "letzte Prüfung" },
          "antwort_ms": { "type": ["integer", "null"], "description": "Dauer der letzten gelungenen Prüfung" },
          "verfuegbar_24h": { "type": ["number", "null"], "minimum": 0, "maximum": 1, "description": "Anteil gelungener Prüfungen im Verlauf" },
          "verlauf": {
            "type": "array",
            "description": "90 Abschnitte, ältester zuerst",
            "items": {
              "type": "object",
              "required": ["beginn", "verfuegbar"],
              "properties": {
                "beginn": { "type": "string", "format": "date-time" },
                "verfuegbar": { "type": ["number", "null"], "minimum": 0, "maximum": 1, "description": "null: in diesem Abschnitt nicht geprüft" }
              }
            }
          }
        }
      }
    }
  }
}
