New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@certd/cv4pve-api-javascript

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@certd/cv4pve-api-javascript

Proxmox VE Client API JavaScript

latest
Source
npmnpm
Version
8.4.2
Version published
Maintainers
1
Created
Source

cv4pve-api-javascript

Proxmox VE Client API JavaScript

GitHub release npm

Proxmox VE Api

   ______                _                      __
  / ____/___  __________(_)___ _   _____  _____/ /_
 / /   / __ \/ ___/ ___/ / __ \ | / / _ \/ ___/ __/
/ /___/ /_/ / /  (__  ) / / / / |/ /  __(__  ) /_
\____/\____/_/  /____/_/_/ /_/|___/\___/____/\__/

Corsinvest for Proxmox VE Api Client  (Made in Italy)

Copyright: Corsinvest Srl For licensing details please visit LICENSE

Commercial Support

This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the site

General

The client is generated from a JSON Api on Proxmox VE.

Result

The result is class Result and contain methods:

  • response returned from Proxmox VE (data,errors,...) JSON
  • responseInError (bool) : Contains errors from Proxmox VE.
  • statusCode (int) : Status code of the HTTP response.
  • reasonPhrase (string): The reason phrase which typically is sent by servers together with the status code.
  • isSuccessStatusCode (bool) : Gets a value that indicates if the HTTP response was successful.

Main features

  • Easy to learn
  • Method named
  • Implementation respect the Api structure of Proxmox VE
  • Full method generated from documentation
  • Comment any method and parameters
  • Parameters indexed eg [n] is structured in array index and value
  • Tree structure
    • await client.nodes.get('pve1').qemu.vmlist().response
  • Return data Proxmox VE
  • Debug show information
  • Return result
    • Request
    • Response
    • Status
  • Last result action
  • Wait task finish task
    • waitForTaskToFinish
    • taskIsRunning
    • getExitStatusTask
  • Method directly access
    • get
    • set
    • create
    • delete
  • Login return bool if access
  • Return Result class more information
  • Minimal dependency library
  • ClientBase lite function
  • Form Proxmox VE 6.2 support Api Token for user
  • Login with One-time password for Two-factor authentication

Api token

From version 6.2 of Proxmox VE is possible to use Api token. This feature permit execute Api without using user and password. If using Privilege Separation when create api token remember specify in permission. Format USER@REALM!TOKENID=UUID

Usage

const pve = require('./src');

async function foo() {
    var client = new pve.PveClient('10.92.90.101', 8006);
    //client.logEnabled = true;
    //client.apiToken = '';

    var login = await client.login('root', process.env.PVE_PASSWORD, 'pam');
    if (login) {
        console.log((await client.get('/version')).response);
        console.log((await client.version.version()).response);

        console.log((await client.get('/nodes')).response);
        console.log((await client.nodes.index()).response);

        console.log((await client.get('/nodes/cv-pve01/qemu')).response);
        console.log((await client.nodes.get('cv-pve01').qemu.vmlist(0)).response);

        console.log((await client.get('/nodes/cv-pve01/qemu/103/config/')).response);
        console.log((await client.nodes.get('cv-pve01').qemu.get(103).config.vmConfig()).response);

        console.log((await client.get('/nodes/cv-pve01/qemu/103/snapshot/')).response);
        console.log((await client.nodes.get('cv-pve01').qemu.get(103).snapshot.snapshotList()).response);
    }
}

Keywords

Proxmox VE

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts