48df10b17e
- Harden DB-backed handlers and seed profiles; align client wire shapes for cluster resources, QEMU config, and node SSL fields - Serve plain HTTP on Compose :8006; keep TLS optional (--profile tls) and terminate HTTPS at Kubernetes Ingress - Add pulumi-tests (full contract surface majors 6–9 + BPG lifecycle) and make pulumi-tests - Ship bilingual docs, CHANGELOG, SECURITY, CONTRIBUTING, and GitHub Actions (make ci + Compose/Helm validation)
59 lines
1.4 KiB
Markdown
59 lines
1.4 KiB
Markdown
**Language / Язык:** [English](overview.md) | [Русский](../ru/examples/overview.md)
|
|
|
|
# Client examples overview
|
|
|
|
## Bring-up checklist
|
|
|
|
```bash
|
|
make up
|
|
curl -sf http://localhost:8006/health/ready
|
|
make seed PROFILE=small
|
|
curl -s http://localhost:8006/api2/json/version
|
|
```
|
|
|
|
Optional — pin major 8 for the session:
|
|
|
|
```bash
|
|
curl -s -X POST 'http://localhost:8006/ui/api/contract/apply?major=8'
|
|
```
|
|
|
|
## Endpoints
|
|
|
|
| URL | When |
|
|
|---|---|
|
|
| `http://localhost:8006` | curl, Go, Java, Perl, Ansible, requests |
|
|
| `http://localhost:8006` | proxmoxer, many Terraform/Pulumi TLS clients |
|
|
|
|
## Auth quick reference
|
|
|
|
**Ticket**
|
|
|
|
```bash
|
|
RESP=$(curl -s -X POST -d 'username=root@pam&password=secret' \
|
|
http://localhost:8006/api2/json/access/ticket)
|
|
TICKET=$(echo "$RESP" | jq -r .data.ticket)
|
|
CSRF=$(echo "$RESP" | jq -r .data.CSRFPreventionToken)
|
|
```
|
|
|
|
**Token header**
|
|
|
|
```text
|
|
Authorization: PVEAPIToken=root@pam!automation=automation-secret
|
|
```
|
|
|
|
## UPID waiting
|
|
|
|
Never treat the mutation HTTP response alone as “VM running”. Poll
|
|
`/nodes/{node}/tasks/{upid}/status` until `data.status` is terminal (typically
|
|
`stopped` with exit status OK for completed tasks — match Proxmox fields your
|
|
client already understands).
|
|
|
|
## Reseed warning
|
|
|
|
`make seed` replaces PostgreSQL guests. Refresh Terraform/Pulumi/Ansible state
|
|
afterwards.
|
|
|
|
## Runnable tree
|
|
|
|
See [`examples/README.md`](../../examples/README.md).
|