docs: align versions and update update-service docs
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
ID: DOC_000006 | Version: 0.1.0 | Status: Draft
|
||||
ID: DOC_000006 | Version: 0.2.1 | Status: Draft
|
||||
By: Codex (GPT-5)
|
||||
|
||||
# Update API (Kiddo Backend)
|
||||
@ -8,6 +8,16 @@ Definiert interne API-Endpunkte fuer Update-Status, Check, Apply, Rollback und L
|
||||
|
||||
## Endpoints
|
||||
|
||||
### POST /update/enroll
|
||||
Body (optional):
|
||||
```json
|
||||
{ "enroll_token": "<one-time-token>" }
|
||||
```
|
||||
Antwort:
|
||||
```json
|
||||
{ "enrolled": true, "message": "Enrollment successful" }
|
||||
```
|
||||
|
||||
### GET /update/status
|
||||
Antwort:
|
||||
```json
|
||||
@ -15,7 +25,8 @@ Antwort:
|
||||
"current_version": "0.1.2",
|
||||
"last_status": "success|failed|unknown",
|
||||
"last_error": "<optional>",
|
||||
"last_timestamp": "2025-12-28T12:34:56Z"
|
||||
"last_timestamp": "2025-12-28T12:34:56Z",
|
||||
"enrolled": true
|
||||
}
|
||||
```
|
||||
|
||||
@ -51,10 +62,18 @@ Antwort:
|
||||
Antwort:
|
||||
```json
|
||||
[
|
||||
{"timestamp":"2025-12-28T12:34:56Z","status":"success","message":"updated to 0.1.2"}
|
||||
{
|
||||
"timestamp": "2025-12-28T12:34:56Z",
|
||||
"status": "success",
|
||||
"message": "updated to 0.1.2",
|
||||
"version": "0.1.2",
|
||||
"device_id": "kiddo-001",
|
||||
"error": null
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Alle Endpunkte erfordern Auth (Session/Bearer).
|
||||
- Alle Endpunkte erfordern Auth (Session-Cookie oder `Authorization: Bearer <token>`).
|
||||
- Apply/Rollback starten async; UI pollt /update/status.
|
||||
- `/update/enroll` speichert das Update-Token lokal (siehe `SKD_UPDATE_TOKEN_FILE`).
|
||||
|
||||
Reference in New Issue
Block a user