API
Cheat sheet · https://pcornel.dk/topic.php?topic=3764
Answer
Separate transport/TLS, authentication, authorization, request validation, task execution and resulting resource state. HTTP success can mean request acceptance rather than operation completion.
Remember
- HTTP 200/UPID returned ≠ task succeeded.
- API reachable ≠ credentials authorized.
- Task OK ≠ guest application healthy.
- Automation must handle asynchronous status, idempotency and version-specific parameters.
First checks
pvesh get /version— CLI to APIcurl -s -k -H 'Authorization: PVEAPIToken=<user>@<realm>!<tokenid>=<secret>' https://<host>:8006/api2/json/nodes— token authpvesh get /nodes/<node>/tasks/<upid>/status— task status
Commands
pvesh get <api-path> [--output-format json]- Query local Proxmox API tree.
Verify in this order
client → auth → API → task → result
Where it usually breaks
First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.
Proxmox VE → API reference map
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Configured state | Expected API configuration is present | Configuration alone does not prove runtime behavior |
| Runtime state | Relevant API service/object is active and error-free | Runtime state does not prove dependencies |
| Dependency | Backing network, storage, cluster or host dependency is healthy | Local success does not prove end-to-end outcome |
| Acceptance | Original VM/container/workload test succeeds | Required to close the incident |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3764