{"id":20399249,"url":"https://github.com/corsinvest/cv4pve-api-javascript","last_synced_at":"2025-07-19T21:33:01.655Z","repository":{"id":38297010,"uuid":"436586690","full_name":"Corsinvest/cv4pve-api-javascript","owner":"Corsinvest","description":"Proxmox VE Client API JavaScript","archived":false,"fork":false,"pushed_at":"2025-04-09T12:45:17.000Z","size":322,"stargazers_count":35,"open_issues_count":2,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T23:21:14.794Z","etag":null,"topics":["api","api-client","api-gateway","api-rest","javascript","javascript-library","lxc","proxmox","proxmox-apis","proxmox-cluster","proxmox-ve","pve","qemu"],"latest_commit_sha":null,"homepage":"https://www.corsinvest.it/cv4pve","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Corsinvest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-09T11:11:47.000Z","updated_at":"2025-07-01T12:50:56.000Z","dependencies_parsed_at":"2024-02-15T11:27:26.288Z","dependency_job_id":"a4d27c2f-afec-405c-938d-9a4659ead17c","html_url":"https://github.com/Corsinvest/cv4pve-api-javascript","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":0.4,"last_synced_commit":"831cdde88a824cc0f6019076b69d5f1bdb6a8390"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/Corsinvest/cv4pve-api-javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4pve-api-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4pve-api-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4pve-api-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4pve-api-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Corsinvest","download_url":"https://codeload.github.com/Corsinvest/cv4pve-api-javascript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Corsinvest%2Fcv4pve-api-javascript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","api-gateway","api-rest","javascript","javascript-library","lxc","proxmox","proxmox-apis","proxmox-cluster","proxmox-ve","pve","qemu"],"created_at":"2024-11-15T04:27:59.189Z","updated_at":"2025-07-19T21:33:01.629Z","avatar_url":"https://github.com/Corsinvest.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cv4pve-api-javascript\n\nProxmox VE Client API JavaScript\n\n![GitHub release](https://img.shields.io/github/release/Corsinvest/cv4pve-api-javascript.svg) [![npm](https://img.shields.io/npm/dt/@corsinvest/cv4pve-api-javascript?logo=npm)](https://www.npmjs.com/package/@corsinvest/cv4pve-api-javascript)\n\n[Proxmox VE Api](https://pve.proxmox.com/pve-docs/api-viewer/)\n\n```text\n   ______                _                      __\n  / ____/___  __________(_)___ _   _____  _____/ /_\n / /   / __ \\/ ___/ ___/ / __ \\ | / / _ \\/ ___/ __/\n/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_\n\\____/\\____/_/  /____/_/_/ /_/|___/\\___/____/\\__/\n\nCorsinvest for Proxmox VE Api Client  (Made in Italy)\n```\n\n## Copyright and License\n\nCopyright: Corsinvest Srl\nFor licensing details please visit [LICENSE](LICENSE)\n\n## Commercial Support\n\nThis software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.corsinvest.it/cv4pve)\n\n## General\n\nThe client is generated from a JSON Api on Proxmox VE.\n\n## Result\n\nThe result is class **Result** and contain methods:\n\n* **response** returned from Proxmox VE (data,errors,...) JSON\n* **responseInError** (bool) : Contains errors from Proxmox VE.\n* **statusCode** (int) : Status code of the HTTP response.\n* **reasonPhrase** (string): The reason phrase which typically is sent by servers together with the status code.\n* **isSuccessStatusCode** (bool) : Gets a value that indicates if the HTTP response was successful.\n\n## Main features\n\n* Easy to learn\n* Method named\n* Implementation respect the [Api structure of Proxmox VE](https://pve.proxmox.com/pve-docs/api-viewer/)\n* Full method generated from documentation\n* Comment any method and parameters\n* Parameters indexed eg [n] is structured in array index and value\n* Tree structure\n  * await client.nodes.get('pve1').qemu.vmlist().response\n* Return data Proxmox VE\n* Debug show information\n* Return result\n  * Request\n  * Response\n  * Status\n* Last result action\n* Wait task finish task\n  * waitForTaskToFinish\n  * taskIsRunning\n  * getExitStatusTask\n* Method directly access\n  * get\n  * set\n  * create\n  * delete\n* Login return bool if access\n* Return Result class more information\n* Minimal dependency library\n* ClientBase lite function\n* Form Proxmox VE 6.2 support Api Token for user\n* Login with One-time password for Two-factor authentication\n\n## Api token\n\nFrom version 6.2 of Proxmox VE is possible to use [Api token](https://pve.proxmox.com/pve-docs/pveum-plain.html).\nThis feature permit execute Api without using user and password.\nIf using **Privilege Separation** when create api token remember specify in permission.\nFormat USER@REALM!TOKENID=UUID\n\n## Usage\n\n```javascript\nconst pve = require('./src');\n\nasync function foo() {\n    var client = new pve.PveClient('10.92.90.101', 8006);\n    //client.logEnabled = true;\n    //client.apiToken = '';\n\n    var login = await client.login('root', process.env.PVE_PASSWORD, 'pam');\n    if (login) {\n        console.log((await client.get('/version')).response);\n        console.log((await client.version.version()).response);\n\n        console.log((await client.get('/nodes')).response);\n        console.log((await client.nodes.index()).response);\n\n        console.log((await client.get('/nodes/cv-pve01/qemu')).response);\n        console.log((await client.nodes.get('cv-pve01').qemu.vmlist(0)).response);\n\n        console.log((await client.get('/nodes/cv-pve01/qemu/103/config/')).response);\n        console.log((await client.nodes.get('cv-pve01').qemu.get(103).config.vmConfig()).response);\n\n        console.log((await client.get('/nodes/cv-pve01/qemu/103/snapshot/')).response);\n        console.log((await client.nodes.get('cv-pve01').qemu.get(103).snapshot.snapshotList()).response);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorsinvest%2Fcv4pve-api-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorsinvest%2Fcv4pve-api-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorsinvest%2Fcv4pve-api-javascript/lists"}