Files
vmware-api-simulator/docs/web-ui.md
T
inecs f8d3cbdd59 Initial commit: VMware vSphere API simulator scaffold.
Add the FastAPI app, PostgreSQL migrations, Docker/Helm packaging, API
contracts, docs, client examples, and the unit/integration/compatibility
test suite for local client and tooling labs without a real vCenter.
2026-07-18 04:42:11 +03:00

65 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
**Language / Язык:** [English](web-ui.md) | [Русский](ru/web-ui.md)
# Web UI
Open [https://localhost/](https://localhost/) after `make up` (gateway).
Internal simulator port is `8080`; the lab UI is also on that host.
The UI is a laboratory console for the **vSphere** simulator — not a vSphere Client
replacement. It supports light and dark themes, catalog majors **69** (vSphere 78.0U2
floors), request/response editing, history, and runtime contract apply.
## Features
- Endpoint tree and method selector driven by the selected catalog major
- Contract-derived parameters and example payloads
- Request editor, response viewer, and history
- Session login via `POST /api/session` (Basic) → `vmware-api-session-id` header/cookie
- Environment summary (runtime version, hosts, VMs, clusters, datastores, networks)
- Curl / request previews
- Coverage meter for the implemented REST registry
- **Apply as runtime** hot-swap for the active major floor
- Demo / seed load (large / demo-cluster profiles)
- Compact console at `/console.html`
- Link to OpenAPI at `/docs`
## Auth (lab)
| User | Password | Role |
|---|---|---|
| `administrator@vsphere.local` | `VMware1!` | Administrator |
| `readonly@vsphere.local` | `VMware1!` | ReadOnly |
| `operator@vsphere.local` | `VMware1!` | VirtualMachinePowerUser |
| `vmadmin@vsphere.local` | `VMware1!` | VirtualMachineAdministrator |
After sign-in, Send attaches `vmware-api-session-id` automatically.
## Backend helpers
| Method | Path | Purpose |
|---|---|---|
| GET | `/ui/api/versions` | Catalog majors vs runtime |
| GET | `/ui/api/catalog?major=N` | Catalog for major 69 |
| GET | `/ui/api/method?...` | Single method metadata |
| GET | `/ui/api/compatibility?major=N` | Coverage payload |
| POST | `/ui/api/contract/apply?major=N` | Hot-swap runtime contract |
| GET | `/ui/api/demo/state` | Demo dataset state |
| POST | `/ui/api/demo/load` | Load `demo-cluster` |
| POST | `/ui/api/vsphere/seed?profile=…` | Reseed `small` / `large` / `demo-cluster` |
## Version workflow
1. Pick major **6 / 7 / 8 / 9** in the catalog.
2. Inspect methods and coverage.
3. **Apply as runtime** when you want live routes gated to that majors floor.
4. Confirm with `/api/appliance/system/version` and `/ui/api/compatibility`.
Hot-swap is memory-only; restart restores the default settings. Details:
[API versions](api-versions.md).
## Security note
UI and demo endpoints are intended for local development. They are not gated by
a separate admin token in the current build. Do not expose the simulator port to
untrusted networks.