Use it when configuring, checking or troubleshooting API in Proxmox VE.
API
Separate transport/TLS, authentication, authorization, request validation, task execution and resulting resource state. HTTP success can mean request acceptance rather than operation completion.
1. The REST API at /api2/json covers everything the UI does.
2. Use API tokens, not passwords.
3. Many calls return a UPID — poll task status.
4. Verify TLS (don't use -k in production).
5. Respect permissions.
client → auth → API → task → result
Context & applicabilityCommon mistakes · platform/version boundaries
A successful API response shows the request reached a defined API stage; end-evidence of the actual state requires task completion and resource/workload verification.
Operational reference
Fast context before you go deeper.
pvesh get <api-path> [--output-format json]Primary Commands
Configuration and operational commands for this Topic.
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
HTTPS request → pveproxy → auth/ACL → API validation → pvedaemon/task → subsystem state → workload
Step 2 Effective-state and workload closure Verify boundary
A command, API or GUI status should close only the layer it directly observes; it does not automatically validate the next dependency or user-visible outcome.
Step 3 Verification path Verify boundary
Verification is insufficient when it shows only API acceptance, VM running state, device attachment, cluster quorum or a green task.
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.
- 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.
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
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
A successful API response shows the request reached a defined API stage; end-evidence of the actual state requires task completion and resource/workload verification.
In depth
Proxmox REST API at https://<node>:8006/api2/json/…, documented in the API viewer (/pve-docs/api-viewer/). Authenticate with tickets (user/password + CSRF token) or API tokens.
pveum user token add automation@pve ci --privsep 1
pveum acl modify /vms --tokens 'automation@pve!ci' --roles PVEVMAdmin
curl -sk -H 'Authorization: PVEAPIToken=automation@pve!ci=<uuid>' https://pve1:8006/api2/json/cluster/resources?type=vm | jq '.data[] | {vmid,name,node,status}'
pvesh get /nodes/pve1/qemu/120/status/current
With --privsep 1 the token has only the permissions explicitly granted to it, not all of the user's.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
Virtualization configuration is semantic even when a management API accepts it.
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 VE → API. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://pve.proxmox.com/pve-docs/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Proxmox VE → API reference map
Fast operational boundaries and evidence limits for Proxmox VE → API.
| 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 |
Deep reference
Healthy vs suspicious evidence
Output interpretation
Treat stopped, paused, suspended, running, migrating, pending, blocked, degraded, orphaned, disconnected, inaccessible, locked and unknown as distinct states. Do not flatten a transport/API success response into a healthy virtualization outcome.