Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

API

Direct answer

Separate transport/TLS, authentication, authorization, request validation, task execution and resulting resource state. HTTP success can mean request acceptance rather than operation completion.

When to use this

Use it when configuring, checking or troubleshooting API in Proxmox VE.

First 30 seconds

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.

Operational verification

client → auth → API → task → result

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

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.

Platform / version applicability
proxmox-ve
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformproxmox-ve · Proxmox VE
Key commandpvesh get <api-path> [--output-format json]
Scope / prerequisiteUse it when configuring, checking or troubleshooting API in Proxmox VE.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Virtualization command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • 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.
Key checks
  • pvesh get /version — CLI to API
  • curl -s -k -H 'Authorization: PVEAPIToken=<user>@<realm>!<tokenid>=<secret>' https://<host>:8006/api2/json/nodes — token auth
  • pvesh 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docproxmox-ve current

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%
Terminology layer

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.

Aliases that resolve here
proxmox apipve apiapi2 jsonproxmox rest api
Embedded reference data

Quick lookup tables

Proxmox VE → API reference map

Fast operational boundaries and evidence limits for Proxmox VE → API.

BoundaryWhat to verifyEvidence limit
Configured stateExpected API configuration is presentConfiguration alone does not prove runtime behavior
Runtime stateRelevant API service/object is active and error-freeRuntime state does not prove dependencies
DependencyBacking network, storage, cluster or host dependency is healthyLocal success does not prove end-to-end outcome
AcceptanceOriginal VM/container/workload test succeedsRequired to close the incident
Depth when you need it

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.

Confirmation

Confirm action

Continue?