1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00
webvirtcloud/doc/api.md
catborise a629b98f31 docs: split the README into pages under doc/ and CONTRIBUTING.md
The README had grown to 970 lines. It now keeps the introduction, the
features, a quick start, a table of the documentation pages, the
screenshots and the license. The sections moved without changes in
their text to doc/install.md, doc/compute-nodes.md, doc/configuration.md,
doc/ldap.md, doc/backups.md, doc/upgrading.md (with the behavior
changes), doc/api.md and CONTRIBUTING.md; links between them point at
the new pages. Code comments and installer messages that named a README
section name the page now.
2026-11-23 15:08:16 +03:00

14 lines
659 B
Markdown

# REST API
The REST API (Django REST Framework, documented with `drf-spectacular`) takes the login session or an API token. After logging in:
* **Swagger UI:** `http://<server>/swagger/`
* **ReDoc UI:** `http://<server>/redoc/`
* **OpenAPI 3.0 schema:** `http://<server>/api/schema/` (JSON or YAML)
* **API tokens**, for scripts and tools: **Profile → API Tokens**. A token acts as its user and is shown once; an administrator who sets the user's password deletes them. Send it as a header:
```bash
curl -H "Authorization: Token wvc_..." https://<server>/api/v1/instances/
```
The VM and compute lists (also a compute's VMs) take `?tag=<name>`.