proxmox-api is a comprehensive JavaScript and TypeScript client library for interacting with the Proxmox VE API. Currently stable at version `1.1.1`, it offers a unique mapping approach where Proxmox API paths are directly translated into chained method calls (e.g., `/nodes/mynode` becomes `proxmox.nodes.mynode`). The library's core differentiator is its 100% mapping of available Proxmox API calls, complete with extensive TypeScript typings that enable rich IntelliSense, significantly reducing the need to consult external API documentation. It features a small footprint, weighing less than 10KB including its integrated documentation. Releases appear to be ad-hoc but frequent, driven by bug fixes and compatibility updates, such as recent enhancements for ESM and Proxmox 8 support. It supports multiple authentication methods including username/password and API tokens.
npm install proxmox-apiVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Proxmox API client, connect to a Proxmox host (using environment variables for sensitive data), list all cluster nodes, and then iterate through each node to retrieve and log configuration details for all running QEMU virtual machines.
For development, set `process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";` before initializing the client. In production, configure proper SSL certificate validation or use a trusted CA.
Replace `object.field-name` with `object['field-name']` for all API path segments that contain hyphens.
Ensure you are using `proxmox-api@1.1.0` or later for improved ESM compatibility and robust CJS support. Review your `tsconfig.json` and `package.json` for correct module resolution settings if issues persist.
Explicitly specify the `port` option in the client configuration (`proxmoxApi({ host: '...', port: 8006, ... })`) to ensure consistent connectivity, regardless of library default changes.Set `process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";` in your application's entry point before initializing the `proxmox-api` client. For production, consider using a trusted certificate or properly configuring your environment's CA certificates.
Double-check the API path mapping against the Proxmox API Viewer (e.g., `proxmox.nodes.$(node.name).qemu.$(vmid).config.$get()`) and ensure all dynamic segments (`$(variable)`) are correctly provided. Verify the path matches the official Proxmox API structure.
Use bracket notation to access hyphenated API path segments: `proxmox.qemu.$(vmid).agent['get-fsinfo'].$get()`.
No dependency data recorded yet.