Automation · Proxmox Automation
Proxmox API
Cheat sheet · https://pcornel.dk/topic.php?topic=5721
Answer
The Proxmox VE API is a REST API at https://host:8006/api2/json covering nodes, VMs, containers, storage and clusters. Use API tokens with limited privileges for automation.
Remember
- API at https://host:8006/api2/json.
- Use API tokens with limited privileges.
- Many calls return a task UPID.
First checks
pvesh get /cluster/resources --type vm— VMs via APIpvesh get /nodes/<node>/tasks/<upid>/status— task statuspveum user token list <user>— tokens
Verify in this order
request → token auth → API → task UPID → status
Where it usually breaks
Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5721