docs: define update backend api
This commit is contained in:
@ -31,6 +31,7 @@ By: Codex (GPT-5)
|
||||
| 28.12.2025 | 🏗️ Planning | ID: US_000033 Rollback-UI dokumentiert. By: Codex (GPT-5) |
|
||||
| 28.12.2025 | 🏗️ Planning | ID: Update-UI Anforderungen um Backup-Voraussetzung ergaenzt. By: Codex (GPT-5) |
|
||||
| 28.12.2025 | 🏗️ Planning | ID: TASK_000030-TASK_000034 fuer Update-UI ausgearbeitet. By: Codex (GPT-5) |
|
||||
| 28.12.2025 | 📝 Req | ID: Update-API Endpunkte dokumentiert. By: Codex (GPT-5) |
|
||||
| 28.12.2025 | ⚙️ Code | ID: Update-Client Prototyp-Skript hinzugefuegt. By: Codex (GPT-5) |
|
||||
|
||||
---
|
||||
|
||||
60
docs/update-api.md
Normal file
60
docs/update-api.md
Normal file
@ -0,0 +1,60 @@
|
||||
ID: DOC_000006 | Version: 0.1.0 | Status: Draft
|
||||
By: Codex (GPT-5)
|
||||
|
||||
# Update API (Kiddo Backend)
|
||||
|
||||
## Purpose
|
||||
Definiert interne API-Endpunkte fuer Update-Status, Check, Apply, Rollback und Logs.
|
||||
|
||||
## Endpoints
|
||||
|
||||
### GET /update/status
|
||||
Antwort:
|
||||
```json
|
||||
{
|
||||
"current_version": "0.1.2",
|
||||
"last_status": "success|failed|unknown",
|
||||
"last_error": "<optional>",
|
||||
"last_timestamp": "2025-12-28T12:34:56Z"
|
||||
}
|
||||
```
|
||||
|
||||
### POST /update/check
|
||||
Antwort:
|
||||
```json
|
||||
{
|
||||
"available": true,
|
||||
"latest_version": "0.1.3",
|
||||
"artifact_url": "https://update.wlkns.org/kiddo/kiddo-0.1.3.tar.gz",
|
||||
"sha256": "<hex>",
|
||||
"message": "<optional>"
|
||||
}
|
||||
```
|
||||
|
||||
### POST /update/apply
|
||||
Body (optional):
|
||||
```json
|
||||
{ "version": "0.1.3" }
|
||||
```
|
||||
Antwort:
|
||||
```json
|
||||
{ "started": true, "message": "update started" }
|
||||
```
|
||||
|
||||
### POST /update/rollback
|
||||
Antwort:
|
||||
```json
|
||||
{ "started": true, "message": "rollback started" }
|
||||
```
|
||||
|
||||
### GET /update/logs
|
||||
Antwort:
|
||||
```json
|
||||
[
|
||||
{"timestamp":"2025-12-28T12:34:56Z","status":"success","message":"updated to 0.1.2"}
|
||||
]
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Alle Endpunkte erfordern Auth (Session/Bearer).
|
||||
- Apply/Rollback starten async; UI pollt /update/status.
|
||||
@ -12,6 +12,7 @@ US_000029
|
||||
## Beschreibung
|
||||
- Update-Status und Version im UI anzeigen.
|
||||
- Letzten Status mit Zeitstempel visualisieren.
|
||||
- API-Basis: `GET /update/status` (siehe `docs/update-api.md`).
|
||||
|
||||
## Definition of Done (DoD)
|
||||
- UI zeigt Version + letzten Status.
|
||||
|
||||
@ -12,6 +12,7 @@ US_000030
|
||||
## Beschreibung
|
||||
- Button/Action fuer "Nach Updates suchen".
|
||||
- Ergebnisanzeige (Update verfuegbar/keine Updates/Fehler).
|
||||
- API-Basis: `POST /update/check` (siehe `docs/update-api.md`).
|
||||
|
||||
## Definition of Done (DoD)
|
||||
- UI zeigt Ergebnis des Update-Checks.
|
||||
|
||||
@ -13,6 +13,7 @@ US_000031
|
||||
- "Update installieren" Action.
|
||||
- Vor Start Backup-Pruefung/Backup-Erstellung erzwingen.
|
||||
- Fortschritt/Status im UI.
|
||||
- API-Basis: `POST /update/apply` (siehe `docs/update-api.md`).
|
||||
|
||||
## Definition of Done (DoD)
|
||||
- Update startet nur mit vorhandenem Backup.
|
||||
|
||||
@ -12,6 +12,7 @@ US_000032
|
||||
## Beschreibung
|
||||
- Logliste mit Zeitstempel und Ergebnis.
|
||||
- Keine sensiblen Daten anzeigen.
|
||||
- API-Basis: `GET /update/logs` (siehe `docs/update-api.md`).
|
||||
|
||||
## Definition of Done (DoD)
|
||||
- Logs sind sichtbar und chronologisch sortiert.
|
||||
|
||||
@ -13,6 +13,7 @@ US_000033
|
||||
- "Rollback" Action.
|
||||
- Nur aktiv, wenn Backup vorhanden.
|
||||
- Fortschritt/Status im UI.
|
||||
- API-Basis: `POST /update/rollback` (siehe `docs/update-api.md`).
|
||||
|
||||
## Definition of Done (DoD)
|
||||
- Rollback startet nur bei verfuegbarem Backup.
|
||||
|
||||
Reference in New Issue
Block a user