API Reference
HTTP endpoints for reading state and invoking documented actions on ProxMenux Monitor: Home Assistant sensors, Homepage cards, Grafana dashboards, Prometheus collection, n8n flows and custom scripts. Includes endpoint categories, exported metrics and curl examples.
What this page is for
Authentication
When authentication is enabled, protected endpoints expect a JWT bearer token in the request header:
curl -H "Authorization: Bearer <token>" http://<host>:8008/api/system | jqTwo ways to obtain the token:
- API tokens (recommended for integrations). Tokens valid for 365 days, created under Security → API Tokens. Each has a name and can be revoked individually. Use read_only for data collection and select full_admin only for integrations that need administrative actions.
- Login flow (24-hour JWT).
POST /api/auth/loginwith a username, password and TOTP token when required by 2FA. The returned session JWT expires after 24 hours; scripts must authenticate again when it expires.
The auth flow, password policy, 2FA setup, audit log and TLS configuration all live in Access & Authentication.
| Endpoint | Method | Use |
|---|---|---|
| /api/auth/login | POST | Body fields (schematic): {"username","password","totp_token?"}. Returns a 24-hour session JWT. |
| /api/auth/api-tokens | GET | List API tokens (metadata only — names, prefixes, dates; never the actual secret). |
| /api/auth/generate-api-token | POST | Create a 365-day API token using an authenticated session. Body fields: password, token_name?, totp_token?, scope?. Password and any required TOTP are checked again. Scope defaults to read_only; full_admin must be selected explicitly. The secret is returned only once. |
| /api/auth/api-tokens/<id> | DELETE | Revoke a specific API token by its ID. |
Conventions
- Most endpoints use JSON. Downloads can return plain text, and
/api/prometheusreturns Prometheus text exposition format version 0.0.4 rather than OpenMetrics. Check the response type of the specific route. - Many write endpoints return
{"success": true, ...}. Error formats vary; a common form is{"success": false, "error": "<reason>"}. Check both HTTP status and response fields: some authentication challenges return HTTP 200 with success false. - Query parameters vary by endpoint. Use
limit,offset,sinceand category-specific filters only where the route supports them. - Time formats vary by endpoint: Unix timestamps, ISO-8601 strings and systemd-formatted dates all occur. Do not assume every time field has the same unit or an explicit timezone.
System & hardware
| Endpoint | Method | Use |
|---|---|---|
| /api/system | GET | CPU, memory, swap, uptime, load — current snapshot. |
| /api/info | GET | Static host info: hostname, kernel, PVE version, CPU model, distro. |
| /api/system-info | GET | Lightweight header info: hostname, uptime and cached health status. Without a token it returns only the health status. |
| /api/hardware | GET | Detailed hardware inventory — PCI devices, GPUs, sensors map. |
| /api/hardware/live | GET | Live values for sensors that change second to second. |
| /api/temperature/history | GET | Time series of CPU / package temperatures. |
| /api/gpu/<slot>/realtime | GET | NVIDIA / Intel / AMD GPU live metrics by PCI slot. |
System actions
The asynchronous system actions below start operations in transient systemd units. With authentication enabled, their write routes require full_admin; read_only tokens can poll .../status. Accepted starts return HTTP 202 with a state snapshot; poll the matching .../status for progress. Guest control and backup use different response contracts, described below.
Common response shape
Asynchronous system actions share the JSON state object below. Guest-control and backup responses have different shapes:
{
"unit": "proxmenux-action-pve-update.service",
"state": "idle | running | success | failed | cancelled",
"started_at": "Sat 2026-08-01 11:01:32 CEST",
"finished_at": null,
"exit_code": null,
"result": null
}Concurrency and cancellation
Starting a second run of the same system action returns HTTP 409 while it is active. Cancellation is available only for actions with a documented DELETE route, such as PVE update. Their state becomes cancelled and preserves timestamps. Terminal snapshots are kept in process memory and can be lost when the Monitor restarts.
| Endpoint | Method | Use |
|---|---|---|
| /api/system/power/reboot | POST | Reboot the Proxmox host. Fire-and-forget — the HTTP connection drops when systemd starts the shutdown sequence. |
| /api/system/power/reboot/status | GET | State of the last / current reboot action. |
| /api/system/power/shutdown | POST | Power off the Proxmox host. Useful as an effect wired to a UPS shutdown signal. |
| /api/system/power/shutdown/status | GET | State of the last / current shutdown action. |
| /api/system/pve-update/run | POST | Trigger the safe PVE update flow (the same one the Health Monitor's Update Now button and the shell menu run — delegates to update-pve-safe.sh). |
| /api/system/pve-update/status | GET | State of the last / current PVE update run. |
| /api/system/pve-update | DELETE | Cancel a PVE update in progress (SIGTERM to the running script). |
| /api/proxmenux/self-update/run | POST | Update ProxMenux using the installer for the configured stable or beta channel. It runs in its own systemd unit so the job can survive the proxmenux-monitor service restart performed by the installer. |
| /api/proxmenux/self-update/status | GET | State of the last / current ProxMenux self-update run. |
| /api/vms/<vmid>/control | POST | Submit VM or LXC power control. Body field action accepts start, stop, shutdown or reboot. A successful response returns a confirmed PVE task; it does not mean the operation has completed. Poll the guest control-task endpoint for its outcome. |
| /api/vms/<vmid>/backup | POST | Create a vzdump backup of a VM or LXC. Body fields, all optional unless the defaults do not match the storage layout: storage (a PVE storage), mode (snapshot, suspend or stop), compress (zstd, lzo, gzip or none), protected (true or false), notes and pbs_change_detection (default, legacy or data). Returns the PVE task UPID. |
| /api/vms/<vmid>/backups | GET | List previous backups for a VM or LXC across all reachable storages. |
Two flavours of action
Host power, PVE update and ProxMenux self-update run in transient systemd units with a .../status endpoint. Only PVE update has the DELETE cancellation route listed here. VM/LXC control returns a PVE task that must be polled; backup returns a UPID for a background job. An accepted request is not completion. Authentication and scope requirements depend on the route.
curl example
Fire a PVE update and poll for completion — the exact same sequence a Home Assistant automation or an Ansible playbook would run:
TOKEN=<your full_admin token>
curl -sSf -X POST \
-H "Authorization: Bearer $TOKEN" \
https://<host>:8008/api/system/pve-update/run
while true; do
state=$(curl -sSf -H "Authorization: Bearer $TOKEN" \
https://<host>:8008/api/system/pve-update/status | jq -r .state)
[ "$state" != "running" ] && break
sleep 30
done
echo "final state: $state"Home Assistant integration snippet
A rest sensor polls the state and a rest_command triggers the update. Wire both to a dashboard button and to any automation you like:
# configuration.yaml
sensor:
- platform: rest
resource: https://pve.local:8008/api/system/pve-update/status
name: pve_update_state
value_template: "{{ value_json.state }}"
scan_interval: 60
headers:
Authorization: "Bearer !secret proxmenux_token"
rest_command:
pve_update:
url: https://pve.local:8008/api/system/pve-update/run
method: POST
headers:
Authorization: "Bearer !secret proxmenux_token"
# Start VM 100 (works for LXC too — same endpoint)
vm_100_start:
url: https://pve.local:8008/api/vms/100/control
method: POST
content_type: 'application/json'
payload: '{"action": "start"}'
headers:
Authorization: "Bearer !secret proxmenux_token"
# Backup VM 100 to the 'pbs-main' storage
vm_100_backup:
url: https://pve.local:8008/api/vms/100/backup
method: POST
content_type: 'application/json'
payload: '{"storage": "pbs-main", "mode": "snapshot", "compress": "zstd"}'
headers:
Authorization: "Bearer !secret proxmenux_token"Health Monitor
| Endpoint | Method | Use |
|---|---|---|
| /api/health | GET | Small health probe returning JSON with status, timestamp and version. Suitable for Uptime Kuma keyword checks; when authentication is enabled, the client must send the bearer header. |
| /api/health/status | GET | Overall health verdict — single severity + summary string. |
| /api/health/details | GET | All ten categories with per-category statuses and the structured payload that produced each. |
| /api/health/full | GET | Full snapshot: categories, active errors, dismissed alerts and custom suppression settings. It uses background check results when less than six minutes old; otherwise, or on a forced refresh, it runs a fresh check. |
| /api/health/active-errors | GET | Active list, filterable by ?category=<name>. |
| /api/health/dismissed | GET | Dismissed list with remaining suppression hours. |
| /api/health/settings | GET | Per-category Suppression Duration values currently configured. |
| /api/health/remote-storages | GET | Inventory of Proxmox-defined remote storages, with online state. |
| /api/health/interfaces | GET | Inventory of network interfaces with type (bridge / bond / physical), IP and link speed. |
| /api/health/acknowledge | POST | Body: {"error_key":"smart_sdh"}. Dismiss an alert with the category's configured Suppression Duration. |
| /api/health/cleanup-orphans | POST | Manual cleanup of errors whose underlying device or VM is gone. Idempotent. |
Response shapes and the semantics of the categories live in Health Monitor.
Storage
| Endpoint | Method | Use |
|---|---|---|
| /api/storage | GET | All disks visible to the host (block devices, ZFS pools, LVM). |
| /api/storage/summary | GET | Compact summary used by dashboard cards. |
| /api/proxmox-storage | GET | Proxmox-defined storages from /etc/pve/storage.cfg with online state and free space. |
| /api/storage/observations | GET | Permanent disk observation history — SMART warnings, I/O errors, ZFS pool events, kept across error auto-resolves. |
| /api/storage/smart/<disk> | GET | Current SMART attributes for one disk. |
| /api/storage/smart/<disk>/latest | GET | Most recent SMART self-test for the disk. |
| /api/storage/smart/<disk>/history | GET | List of stored SMART reports for the disk. |
| /api/storage/smart/<disk>/history/<file> | GET | Read a specific stored SMART report. |
| /api/storage/smart/<disk>/test | POST | Start a SMART self-test. Body schema: {"test_type":"short"|"long"}. |
| /api/storage/smart/schedules | GET | List the currently scheduled SMART tests. |
| /api/storage/smart/tools | GET | Detect whether smartctl and friends are installed. |
Network
| Endpoint | Method | Use |
|---|---|---|
| /api/network | GET | All interfaces with link state and addresses. |
| /api/network/summary | GET | Compact view used by the dashboard. |
| /api/network/<iface>/metrics | GET | Per-interface RX / TX, error counters, RRD time series. |
| /api/network/latency/current | GET | Latest gateway latency probe. |
| /api/network/latency/history | GET | Time series of gateway latency. |
VMs & containers
| Endpoint | Method | Use |
|---|---|---|
| /api/vms | GET | VMs and CTs on the local node, with status, vmid and name. |
| /api/vms/<vmid> | GET | Full detail for one guest (config, network, disks). |
| /api/vms/<vmid>/metrics | GET | CPU / memory / disk I/O time series for one guest (RRD). |
| /api/vms/<vmid>/logs | GET | Recent task logs scoped to that guest. |
| /api/vms/<vmid>/backups | GET | List backups currently held for this guest. |
| /api/vms/<vmid>/control | POST | Choose one action from the body schema: {"action":"start|stop|reboot|shutdown"}. Controls guest power state. |
| /api/vms/<vmid>/backup | POST | Trigger vzdump for that guest. Body chooses storage and mode (snapshot / suspend / stop). |
| /api/vms/<vmid>/config | PUT | Update the description (notes) field of a VM / CT. Other config keys are not modifiable from this endpoint. |
| /api/node/metrics | GET | Aggregated node-level metrics (RRD). |
Backups
| Endpoint | Method | Use |
|---|---|---|
| /api/backups | GET | Backups found in dir, NFS, CIFS and PBS storages queried through the local node. This is not an exhaustive scan of every cluster node. |
| /api/backup-storages | GET | Storages flagged as backup targets, with free space. |
Logs, tasks, events
| Endpoint | Method | Use |
|---|---|---|
| /api/logs | GET | Filtered journal entries. Query: ?priority=&service=&limit=&since_days= (priority 0-7, since_days up to 90). |
| /api/logs/download | GET | Plain-text dump of the filtered range. |
| /api/events | GET | Recent Proxmox cluster tasks and events from pvesh get /cluster/tasks. Query: ?limit= (default 50). |
| /api/task-log/<upid> | GET | Plain-text complete log for one Proxmox task by UPID. |
Notifications & AI
The dispatch pipeline, channel walk-throughs and AI rewriter setup live in Notifications and AI Assistant.
| Endpoint | Method | Use |
|---|---|---|
| /api/notifications | GET | Recent notifications surfaced in the dashboard. |
| /api/notifications/download | GET | Export notifications as text. |
| /api/notifications/status | GET | Dispatcher status — whether the background thread is running, queue depth, last send. |
| /api/notifications/settings | GET | Read the full notification config (channels, per-event toggles, AI rewriter, Display Name). |
| /api/notifications/history | GET | Dispatch history. Query: ?limit=&offset=&severity=&channel=. |
| /api/notifications/history | DELETE | Wipe the dispatch history table. |
| /api/notifications/test | POST | Send a test notification to one channel. Body: {"channel":"telegram"}. |
| /api/notifications/send | POST | Emit a custom event. Body: {"event_type":"custom","severity":"WARNING","title":"...","message":"...","data":{'}'}. |
| /api/notifications/test-ai | POST | Test the AI provider connection. Body fields (schematic): {"provider","api_key","model","ollama_url?"}. |
| /api/notifications/provider-models | POST | List available models for the selected AI provider. |
| /api/notifications/proxmox/setup-webhook | POST | Register the Monitor as a webhook target in /etc/pve/notifications.cfg. |
| /api/notifications/proxmox/cleanup-webhook | POST | Remove the Monitor target from PVE's notification config. |
| /api/notifications/proxmox/read-cfg | GET | Read PVE's current notifications.cfg as PVE sees it. |
Security (read)
| Endpoint | Method | Use |
|---|---|---|
| /api/security/firewall/status | GET | PVE firewall state and active rules. |
| /api/security/fail2ban/details | GET | Fail2Ban jail status — only useful when the optional jail is installed. |
| /api/security/fail2ban/activity | GET | Recent Fail2Ban events (bans, unbans, jail starts). |
| /api/security/lynis/status | GET | Lynis last-run status (whether installed, last scan timestamp). |
| /api/security/lynis/report | GET | Latest Lynis audit report (warnings, suggestions, hardening index). |
| /api/security/tools | GET | Detect which optional security tools (Fail2Ban, Lynis) are installed. |
ProxMenux integration
| Endpoint | Method | Use |
|---|---|---|
| /api/proxmenux/update-status | GET | Whether ProxMenux Monitor has an update available, current and latest version. |
| /api/proxmenux/installed-tools | GET | List of every ProxMenux post-install optimization currently registered on the host (from /usr/local/share/proxmenux/installed_tools.json). |
| /api/proxmenux/tool-source/<key> | GET | Source of the mapped post-install function, extracted from current host scripts or preserved legacy code. This is not a guaranteed snapshot of the exact code originally executed. |
Prometheus metrics
The authenticated GET /api/prometheus endpoint returns Prometheus text exposition format version 0.0.4. Every metric includes node="<hostname>" and an explicit timestamp. Collect it with Prometheus or another compatible time-series database.
Exported metrics
| Group | Metric | Description |
|---|---|---|
| System | proxmox_cpu_usage | CPU usage percentage (gauge). |
| proxmox_memory_total_bytes | Total physical memory in bytes. | |
| proxmox_memory_used_bytes | Used memory in bytes. | |
| proxmox_memory_usage_percent | Memory usage percentage. | |
| proxmox_load_average | System load average. Label period="1m" | "5m" | "15m". | |
| Uptime | proxmox_uptime_seconds | Seconds since last boot. |
| Hardware | proxmox_cpu_temperature_celsius | CPU package temperature. |
| proxmox_disk_temperature_celsius | Temperature per disk. Label disk. | |
| proxmox_fan_speed_rpm | Fan speeds. Label fan. | |
| Disk space | proxmox_disk_total_bytes | Total capacity per exported disk entry. Label disk. |
| proxmox_disk_used_bytes | Used capacity per exported disk entry. | |
| proxmox_disk_usage_percent | Used capacity percentage per exported disk entry. | |
| Network | proxmox_network_bytes_sent_total | Total bytes sent (counter). |
| proxmox_network_bytes_received_total | Total bytes received (counter). | |
| proxmox_interface_bytes_sent_total | Per-interface bytes sent. Label interface. | |
| proxmox_interface_bytes_received_total | Per-interface bytes received. | |
| VMs / CTs | proxmox_vms_total | Total number of VMs and LXCs. |
| proxmox_vms_running | Number of running guests. | |
| proxmox_vms_stopped | Number of stopped guests. | |
| proxmox_vm_status | Status per VM/CT (1 = running, 0 = otherwise). Labels node, vmid, name. | |
| proxmox_vm_cpu_usage | Per-VM/CT CPU usage. Same labels. | |
| proxmox_vm_memory_used_bytes / _max_bytes | Per-VM/CT memory used and configured maximum. | |
| GPU | proxmox_gpu_temperature_celsius | GPU temperature. Labels slot, vendor; also includes the gpu name label. |
| proxmox_gpu_utilization_percent | GPU utilization percentage. | |
| proxmox_gpu_memory_total_bytes | GPU memory total. | |
| proxmox_gpu_power_draw_watts | GPU power draw in watts. | |
| proxmox_gpu_clock_speed_mhz | GPU core clock speed. | |
| proxmox_gpu_memory_clock_mhz | GPU memory clock speed. | |
| UPS | proxmox_ups_battery_charge_percent | Battery charge percentage. |
| proxmox_ups_load_percent | Current load on the UPS. | |
| proxmox_ups_runtime_seconds | Estimated runtime on battery. | |
| proxmox_ups_input_voltage_volts | Input voltage. |
Prometheus scrape config
When authentication is enabled, pass an API token in the bearer header of your Prometheus collection configuration:
# /etc/prometheus/prometheus.yml
scrape_configs:
- job_name: 'proxmenux'
metrics_path: /api/prometheus
scheme: https # or http if TLS isn't enabled in ProxMenux
scrape_interval: 30s
authorization:
type: Bearer
credentials: '<your-api-token>'
static_configs:
- targets:
- 'pve01.lan:8008'
- 'pve02.lan:8008'
- 'pve03.lan:8008'Per-host scrape
node label on every series lets you distinguish them in Grafana queries (proxmox_vms_running{node="pve01"}).Putting it together
For end-to-end recipes wiring these endpoints into Home Assistant sensors, Homepage cards, Grafana dashboards, n8n flows and other tools, see the dedicated Integrations page — it walks through the typical setup for each platform with copy-paste configuration. This page stays focused on the catalogue itself.
Where to next
- Access & Authentication — minting tokens, the audit log, the optional Fail2Ban jail, TLS configuration.
- Notifications — what each event type carries in
datawhen you call/api/notifications/send. - AI Assistant — how
/api/notifications/test-aiand/api/notifications/provider-modelsare wired. - Health Monitor — the response shape of
/api/health/*and the semantics of the ten categories.