"title":"Proxmox Monitor API — Integration Reference | ProxMenux",
"description":"HTTP endpoints exposed by ProxMenux Monitor for integrations: Home Assistant, Homepage, Grafana, Prometheus, n8n and custom dashboards. Read-only data export plus the safe write operations needed by automations — VM control, backup trigger, notification dispatch, alert acknowledgement.",
"ogTitle":"Proxmox Monitor API — Integration Reference",
"ogDescription":"Endpoints exposed by ProxMenux Monitor for Home Assistant, Homepage, Grafana, Prometheus, n8n and custom dashboards.",
"twitterTitle":"Proxmox Monitor API | ProxMenux",
"twitterDescription":"Endpoints for Home Assistant, Homepage, Grafana, Prometheus, n8n and custom dashboards."
},
"header":{
"title":"API Reference",
"description":"The HTTP endpoints integrators use to read state and trigger safe actions on ProxMenux Monitor — Home Assistant sensors, Homepage cards, Grafana dashboards, Prometheus scrapes, n8n flows and custom scripts. Every category, plus a complete list of Prometheus metrics, with curl examples.",
"section":"ProxMenux Monitor"
},
"intro":{
"title":"What this page is for",
"body":"This page lists the endpoints we expect external integrations to use — read-only data export across every part of the Monitor, plus the small set of write operations that automations legitimately need (trigger a backup, send a custom notification, acknowledge an alert). The whole API runs from the same Flask process that serves the dashboard UI on TCP <strong>8008</strong>; bind address and TLS are configured in <link>Access & Authentication</link>."
},
"headerEndpoint":"Endpoint",
"headerMethod":"Method",
"headerUse":"Use",
"auth":{
"heading":"Authentication",
"intro":"Every endpoint marked \"authenticated\" expects a JWT bearer token in the request header:",
"tokensIntro":"Two ways to obtain the token:",
"items":[
"<strong>API tokens (recommended for integrations).</strong> Long-lived tokens minted from <strong>Settings → Security → API Tokens</strong> in the dashboard. Each token is named, can be revoked individually, and is what you should hand to Home Assistant / Homepage / Grafana / n8n.",
"<strong>Login flow (short-lived JWT).</strong> <code>POST /api/auth/login</code> with a username, password and TOTP token if 2FA is enabled. The returned JWT is short-lived and refreshed by the dashboard automatically; useful for ad-hoc scripts that authenticate as a human user."
],
"flowLink":"The auth flow, password policy, 2FA setup, audit log and TLS configuration all live in <link>Access & Authentication</link>.",
"rows":[
{
"endpoint":"/api/auth/login",
"method":"POST",
"use":"Body: <code>'{'\"username\",\"password\",\"totp_token?\"'}'</code>. Returns a short-lived JWT."
},
{
"endpoint":"/api/auth/api-tokens",
"method":"GET",
"use":"List API tokens (metadata only — names, prefixes, dates; never the actual secret)."
},
{
"endpoint":"/api/auth/api-tokens",
"method":"POST",
"use":"Mint a new long-lived API token. Body: <code>'{'\"name\":\"'<'label'>'\"'}'</code>. The token value is returned once and cannot be retrieved again."
},
{
"endpoint":"/api/auth/api-tokens/<id>",
"method":"DELETE",
"use":"Revoke a specific API token by its ID."
}
]
},
"conventions":{
"heading":"Conventions",
"items":[
"All requests and responses are JSON unless explicitly noted (log download is plain text, <code>/api/prometheus</code> is text/plain in the OpenMetrics format, task log is plain text).",
"Successful mutating endpoints return <code>'{'\"success\": true, ...'}'</code>. Error responses use a non-2xx HTTP status with <code>'{'\"success\": false, \"error\": \"'<'reason'>'\"'}'</code>.",
"List endpoints accept optional <code>limit</code>, <code>offset</code>, <code>since</code> and category-specific filters via query string.",
"Time fields are returned as Unix epoch seconds or ISO-8601 with explicit timezone, never as locale strings."
]
},
"system":{
"heading":"System & hardware",
"rows":[
{
"endpoint":"/api/system",
"method":"GET",
"use":"CPU, memory, swap, uptime, load — current snapshot."
},
{
"endpoint":"/api/info",
"method":"GET",
"use":"Static host info: hostname, kernel, PVE version, CPU model, distro."
},
{
"endpoint":"/api/system-info",
"method":"GET",
"use":"Extended system snapshot used by the dashboard header (overall metrics + boot time)."
"intro":"Fire-and-forget endpoints that trigger the same operations the operator would run from the Monitor UI or the shell menu — designed for Home Assistant, Homepage, Ansible, custom dashboards and any other automation that needs to reach into the host over HTTP. Every mutating route requires a token with <code>full_admin</code> scope; read-only <code>read_only</code> tokens can still poll the <code>.../status</code> endpoints without triggering anything. Each action returns 202 with a state snapshot; poll the matching <code>.../status</code> to observe progress.",
"shapeTitle":"Common response shape",
"shapeIntro":"All action endpoints return the same JSON object — one shape to parse from any client:",
"concurrencyTitle":"Concurrency and cancellation",
"concurrencyBody":"A second POST while a run is in flight returns 409 with the current running state. Cancel an in-flight run with a DELETE to the action's base URL; the state moves to <code>cancelled</code> and timestamps are preserved so the caller can still see when it was triggered and stopped. The last terminal state (success / failed / cancelled) is remembered until the next run replaces it.",
"rows":[
{
"endpoint":"/api/system/power/reboot",
"method":"POST",
"use":"Reboot the Proxmox host. Fire-and-forget — the HTTP connection drops when systemd starts the shutdown sequence."
},
{
"endpoint":"/api/system/power/reboot/status",
"method":"GET",
"use":"State of the last / current reboot action."
},
{
"endpoint":"/api/system/power/shutdown",
"method":"POST",
"use":"Power off the Proxmox host. Useful as an effect wired to a UPS shutdown signal."
},
{
"endpoint":"/api/system/power/shutdown/status",
"method":"GET",
"use":"State of the last / current shutdown action."
},
{
"endpoint":"/api/system/pve-update/run",
"method":"POST",
"use":"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)."
},
{
"endpoint":"/api/system/pve-update/status",
"method":"GET",
"use":"State of the last / current PVE update run."
},
{
"endpoint":"/api/system/pve-update",
"method":"DELETE",
"use":"Cancel a PVE update in progress (SIGTERM to the running script)."
},
{
"endpoint":"/api/proxmenux/self-update/run",
"method":"POST",
"use":"Update ProxMenux itself by piping the canonical stable installer. Runs in its own systemd unit so the update completes across the proxmenux-monitor restart the installer performs."
},
{
"endpoint":"/api/proxmenux/self-update/status",
"method":"GET",
"use":"State of the last / current ProxMenux self-update run."
},
{
"endpoint":"/api/vms/<vmid>/control",
"method":"POST",
"use":"Start / stop / shutdown / reboot a VM or LXC container (the same operations the Monitor's VM & LXC modal exposes). Body: {\"action\": \"start|stop|shutdown|reboot\"}. Synchronous — returns the outcome directly with no polling needed."
},
{
"endpoint":"/api/vms/<vmid>/backup",
"method":"POST",
"use":"Create a vzdump backup of a VM or LXC. Body (all optional except when the defaults don't match your storage layout): {\"storage\": \"<pve-storage>\", \"mode\": \"snapshot|suspend|stop\", \"compress\": \"zstd|lzo|gz|none\", \"protected\": true, \"notes\": \"…\", \"notification\": \"auto|always|failure|never\", \"pbs_change_detection\": \"default|legacy|data\"}. Returns the PVE task UPID."
},
{
"endpoint":"/api/vms/<vmid>/backups",
"method":"GET",
"use":"List previous backups for a VM or LXC across all reachable storages."
}
],
"syncVsAsyncTitle":"Two flavours of action",
"syncVsAsyncBody":"System-level actions (host power, PVE update, ProxMenux self-update) can take minutes — they run in their own transient systemd unit and expose a <code>.../status</code> endpoint plus a <code>DELETE</code> to cancel. VM / LXC actions (start, stop, shutdown, reboot, backup) are fast and use the fire-and-return style the Monitor's UI already exposes: the POST returns the outcome directly. Both flavours share the same authentication model (JWT or long-lived API token).",
"curlTitle":"curl example",
"curlBody":"Fire a PVE update and poll for completion — the exact same sequence a Home Assistant automation or an Ansible playbook would run:",
"haBody":"A <code>rest</code> sensor polls the state and a <code>rest_command</code> triggers the update. Wire both to a dashboard button and to any automation you like:",
"use":"Small health probe — returns JSON with <code>status</code>, <code>timestamp</code>, <code>version</code>. Suitable for Uptime Kuma keyword checks; the receiver must send the bearer header."
},
{
"endpoint":"/api/health/status",
"method":"GET",
"use":"Overall health verdict — single severity + summary string."
},
{
"endpoint":"/api/health/details",
"method":"GET",
"use":"All ten categories with per-category statuses and the structured payload that produced each."
},
{
"endpoint":"/api/health/full",
"method":"GET",
"use":"Full snapshot — categories + active errors + dismissed list + custom suppression settings. Backs the modal in one round-trip; uses a 6-min background cache for instant response."
},
{
"endpoint":"/api/health/active-errors",
"method":"GET",
"use":"Active list, filterable by <code>?category=<name></code>."
},
{
"endpoint":"/api/health/dismissed",
"method":"GET",
"use":"Dismissed list with remaining suppression hours."
},
{
"endpoint":"/api/health/settings",
"method":"GET",
"use":"Per-category Suppression Duration values currently configured."
},
{
"endpoint":"/api/health/remote-storages",
"method":"GET",
"use":"Inventory of Proxmox-defined remote storages, with online state."
},
{
"endpoint":"/api/health/interfaces",
"method":"GET",
"use":"Inventory of network interfaces with type (bridge / bond / physical), IP and link speed."
},
{
"endpoint":"/api/health/acknowledge",
"method":"POST",
"use":"Body: <code>'{'\"error_key\":\"smart_sdh\"'}'</code>. Dismiss an alert with the category's configured Suppression Duration."
},
{
"endpoint":"/api/health/cleanup-orphans",
"method":"POST",
"use":"Manual cleanup of errors whose underlying device or VM is gone. Idempotent."
}
],
"outro":"Response shapes and the semantics of the categories live in <link>Health Monitor</link>."
},
"storage":{
"heading":"Storage",
"rows":[
{
"endpoint":"/api/storage",
"method":"GET",
"use":"All disks visible to the host (block devices, ZFS pools, LVM)."
},
{
"endpoint":"/api/storage/summary",
"method":"GET",
"use":"Compact summary used by dashboard cards."
},
{
"endpoint":"/api/proxmox-storage",
"method":"GET",
"use":"Proxmox-defined storages from <code>/etc/pve/storage.cfg</code> with online state and free space."
},
{
"endpoint":"/api/storage/observations",
"method":"GET",
"use":"Permanent disk observation history — SMART warnings, I/O errors, ZFS pool events, kept across error auto-resolves."
},
{
"endpoint":"/api/storage/smart/<disk>",
"method":"GET",
"use":"Current SMART attributes for one disk."
},
{
"endpoint":"/api/storage/smart/<disk>/latest",
"method":"GET",
"use":"Most recent SMART self-test for the disk."
},
{
"endpoint":"/api/storage/smart/<disk>/history",
"method":"GET",
"use":"List of stored SMART reports for the disk."
"use":"Internal event stream — the same one that feeds notifications."
},
{
"endpoint":"/api/task-log/<upid>",
"method":"GET",
"use":"Plain-text complete log for one Proxmox task by UPID."
}
]
},
"notifications":{
"heading":"Notifications & AI",
"intro":"The dispatch pipeline, channel walk-throughs and AI rewriter setup live in <notifLink>Notifications</notifLink> and <aiLink>AI Assistant</aiLink>.",
"rows":[
{
"endpoint":"/api/notifications",
"method":"GET",
"use":"Recent notifications surfaced in the dashboard."
},
{
"endpoint":"/api/notifications/download",
"method":"GET",
"use":"Export notifications as text."
},
{
"endpoint":"/api/notifications/status",
"method":"GET",
"use":"Dispatcher status — whether the background thread is running, queue depth, last send."
},
{
"endpoint":"/api/notifications/settings",
"method":"GET",
"use":"Read the full notification config (channels, per-event toggles, AI rewriter, Display Name)."
},
{
"endpoint":"/api/notifications/history",
"method":"GET",
"use":"Dispatch history. Query: <code>?limit=&offset=&severity=&channel=</code>."
},
{
"endpoint":"/api/notifications/history",
"method":"DELETE",
"use":"Wipe the dispatch history table."
},
{
"endpoint":"/api/notifications/test",
"method":"POST",
"use":"Send a test notification to one channel. Body: <code>'{'\"channel\":\"telegram\"'}'</code>."
},
{
"endpoint":"/api/notifications/send",
"method":"POST",
"use":"Emit a custom event. Body: <code>'{'\"event_type\":\"custom\",\"severity\":\"WARNING\",\"title\":\"...\",\"body\":\"...\",\"data\":'{''}''}'</code>."
},
{
"endpoint":"/api/notifications/test-ai",
"method":"POST",
"use":"Test the AI provider connection. Body: <code>'{'\"provider\",\"api_key\",\"model\",\"ollama_url?\"'}'</code>."
},
{
"endpoint":"/api/notifications/provider-models",
"method":"POST",
"use":"List available models for the selected AI provider."
"use":"Detect which optional security tools (Fail2Ban, Lynis) are installed."
}
]
},
"proxmenuxIntegration":{
"heading":"ProxMenux integration",
"rows":[
{
"endpoint":"/api/proxmenux/update-status",
"method":"GET",
"use":"Whether ProxMenux Monitor has an update available, current and latest version."
},
{
"endpoint":"/api/proxmenux/installed-tools",
"method":"GET",
"use":"List of every ProxMenux post-install optimization currently registered on the host (from <code>/usr/local/share/proxmenux/installed_tools.json</code>)."
},
{
"endpoint":"/api/proxmenux/tool-source/<key>",
"method":"GET",
"use":"Source code of a specific post-install function — the exact bash that was applied."
}
]
},
"prometheus":{
"heading":"Prometheus metrics",
"intro":"ProxMenux Monitor exposes a Prometheus-format scrape endpoint at <code>GET /api/prometheus</code> (authenticated) returning OpenMetrics-format text. Every metric is labelled with <code>node=\"<hostname>\"</code> and carries an explicit timestamp so it ingests cleanly into Prometheus, VictoriaMetrics, Mimir or any compatible TSDB.",
"scrapeIntro":"The endpoint requires authentication. Pass the API token as a bearer header in your Prometheus scrape config:",
"perHostTitle":"Per-host scrape",
"perHostBody":"Each ProxMenux Monitor instance exports metrics for the host it runs on. In a cluster, point Prometheus at every node — the <code>node</code> label on every series lets you distinguish them in Grafana queries (<code>proxmox_vms_running'{'node=\"pve01\"'}'</code>)."
},
"puttingItTogether":{
"heading":"Putting it together",
"body":"For end-to-end recipes wiring these endpoints into Home Assistant sensors, Homepage cards, Grafana dashboards, n8n flows and other tools, see the dedicated <link>Integrations</link> page — it walks through the typical setup for each platform with copy-paste configuration. This page stays focused on the catalogue itself."
},
"whereNext":{
"heading":"Where to next",
"items":[
{
"label":"Access & Authentication",
"href":"/docs/monitor/access-auth",
"tail":" — minting tokens, the audit log, the optional Fail2Ban jail, TLS configuration."
},
{
"label":"Notifications",
"href":"/docs/monitor/notifications",
"tailRich":" — what each event type carries in <code>data</code> when you call <code>/api/notifications/send</code>."
},
{
"label":"AI Assistant",
"href":"/docs/monitor/ai-assistant",
"tailRich":" — how <code>/api/notifications/test-ai</code> and <code>/api/notifications/provider-models</code> are wired."
},
{
"label":"Health Monitor",
"href":"/docs/monitor/health-monitor",
"tailRich":" — the response shape of <code>/api/health/*</code> and the semantics of the ten categories."