Use this when calling the Proxmox REST API.
Proxmox API
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.
1. The Proxmox API (/api2/json) exposes everything.
2. Tokens with minimal roles.
3. Async tasks return UPIDs — poll them.
4. Verify TLS certificates.
5. Rate of requests.
request → token auth → API → task UPID → status
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
For Proxmox Automation → Proxmox API, the evidence must connect the control-plane result to the Proxmox cluster object plus guest/storage/network state visible after the asynchronous task converges and explain any gap between desired, controller-reported and consumer-visible state.
Step 2 Common mistakes Narrow the fault
- API tokens with full privileges.
- Ignoring task UPID results.
Step 3 Where it fails Narrow the fault
Failure analysis for Proxmox Automation → Proxmox API should follow the path through the components: automation definition → Proxmox API → cluster/node service → UPID task → VM/LXC/storage/network/Ceph object → status/config read-back.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- API at https://host:8006/api2/json.
- Use API tokens with limited privileges.
- Many calls return a task UPID.
pvesh get /cluster/resources --type vm— VMs via APIpvesh get /nodes/<node>/tasks/<upid>/status— task statuspveum user token list <user>— tokens
ReferenceWhy it matters1 section · depth on demand
In depth
The Proxmox VE API is a REST API on port 8006 that exposes everything the web UI does: nodes, VMs, containers, storage, networking, backups and cluster status. Automation authenticates with API tokens (recommended) or tickets.
curl -s -H "Authorization: PVEAPIToken=automation@pve!ci=$TOKEN" \
https://pve01.example.com:8006/api2/json/cluster/resources?type=vm | jq '.data[] | {vmid, name, status, node}'
pvesh get /nodes/pve01/qemu --output-format json # same API from the CLI
Create tokens with privilege separation and assign only the roles needed (e.g. PVEVMAdmin on a pool). Use the proxmoxer Python library or the Terraform provider for larger tooling; validate TLS with the cluster's CA instead of disabling verification.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Proxmox Automation → Proxmox API is owned at runtime by the Proxmox VE API, cluster services and asynchronous task workers acting on VM, LXC, storage, network, backup or Ceph objects. Follow the chain of components automation definition → Proxmox API → cluster/node service → UPID task → VM/LXC/storage/network/Ceph object → status/config read-back and record which layer currently owns truth.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Proxmox Automation > Proxmox API. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://pve.proxmox.com/pve-docs/api-viewer/ · confidence 94%