feat: add graceful shutdown endpoint for UVM API server and update documentation
This commit is contained in:
@@ -303,6 +303,7 @@ The server exposes these routes:
|
||||
| `GET` | `/` | Redirect to the local dashboard |
|
||||
| `GET` | `/dashboard` | Serve the local management dashboard |
|
||||
| `GET` | `/health` | Unauthenticated liveness response |
|
||||
| `POST` | `/exit` | Gracefully stop the UVM API server |
|
||||
| `GET` | `/diagnostics` | Run host readiness checks for the dashboard/system view |
|
||||
| `POST` | `/install` | Install or refresh host assets; body: `{ "force": false }` |
|
||||
| `GET` | `/vms` | List VM records and observed status |
|
||||
@@ -364,6 +365,18 @@ curl \
|
||||
http://127.0.0.1:8000/vms
|
||||
```
|
||||
|
||||
Stop the API server without stopping its managed VMs:
|
||||
|
||||
```sh
|
||||
curl -X POST \
|
||||
-H "X-UVM-Token: $UVM_API_TOKEN" \
|
||||
http://127.0.0.1:8000/exit
|
||||
```
|
||||
|
||||
The endpoint returns `202 {"status":"stopping"}` and then gracefully terminates
|
||||
the UVM API process. It is a protected management endpoint; it does not stop or
|
||||
delete managed VMs.
|
||||
|
||||
Do not expose this server directly to an untrusted network. For remote access,
|
||||
keep TLS enabled and consider placing it behind an additional authenticated
|
||||
reverse proxy.
|
||||
|
||||
Reference in New Issue
Block a user