npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

proxmox-for-node

v0.1.2

Published

Proxmox APIv2 implementation for NodeJS

Downloads

2

Readme

Proxmox API for Node

Artistic 2.0 License

Proxmox HomepageProxmox API WikiProxmox API Documentation

Features

  • Typescript support
  • API Token first
  • Easy callbacks

Todo

There are still some things that need to be done. See Issues for more details.

  • Generate coverage for API endpoints
  • Typescript definitions for endpoint JSON
  • Promise support
  • JSDocs for endpoints

Installation

yarn add https://github.com/Incode-Laboratories/Proxmox-API-for-Node

or install from here.

Example:

import proxmox from "proxmox-for-node";
const remote = proxmox({
    endpoint: "https://proxmox.example.com:8006/",
    api: "root@pam!mytoken=aaaaaaaaa-bbb-cccc-dddd-ef0123456789"
})
remote.getClusterStatus((err, response) => {
    if(err) throw err;
    else {
        data = JSON.parse(response);
        console.log(data);
    }
});

Callback is a function of the form function(err, response){} data is an object, not a string. everything else is a string

Usage

All returned responses are strings that can be parsed in to JSON as per the API reference.

getNodes(callback);

getQemu(node, callback);

createQemu(node, data,  callback)

getStorage(callback);

getClusterStatus(callback);

getClusterBackupSchedule(callback);

getNodeNetworks(node, callback);

getNodeInterface(node, interface, callback);

getNodeContainerIndex(node, callback);

getNodeVirtualIndex(node, callback);

getNodeServiceState(node, service, callback);

getNodeStorage(node, callback);

getNodeFinishedTasks(node, callback);

getNodeDNS(node, callback);

getNodeSyslog(node, callback);

getNodeRRD(node, callback);

getNodeRRDData(node, callback);

getNodeBeans(node, callback);

getNodeTaskByUPID(node, upid, callback);

getNodeTaskStatusByUPID(node, upid, callback);

getNodeTaskLogByUPID(node, upid, callback);

getNodeTaskStatusByUPID(node, upid, callback);

getNodeScanMethods(node, callback);

getRemoteiSCSI(node, callback);

getNodeLVMGroups(node, callback);

getRemoteNFS(node, callback);

getNodeUSB(node, callback);

getStorageVolumeData(node, storage, volume, callback);

getStorageConfig(storage, callback);

getNodeStorageContent(node, storage, callback);

getNodeStorageRRD(node, storage, callback);

getNodeStorageRRDData(node, storage, callback);

deleteNodeNetworkConfig(node, callback);

deleteNodeInterface(node, interface, callback);

deletePool(poolid, callback);

setNodeDNSDomain(node, domain, callback);

setNodeSubscriptionKey(node, key, callback);

setNodeTimeZone(node, timezone, callback);

setPoolData(poolid, data, callback);

updateStorageConfiguration(storageid, data, callback);

OpenVZ

openvz.createOpenvzContainer(node, data, callback);

openvz.mountOpenvzPrivate(node, vmid, callback);

openvz.shutdownOpenvzContainer(node, vmid, callback);

openvz.startOpenvzContainer(node, vmid, callback);

openvz.stopOpenvzContainer(node, vmid, callback);

openvz.unmountOpenvzContainer(node, vmid, callback);

openvz.migrateOpenvzContainer(node, vmid, target, callback);

openvz.getContainerIndex(node, vmid, callback);

openvz.getContainerSTatus(node, vmid, callback);

openvz.getContainerBeans(node, vmid, callback);

openvz.getContainerConfig(node, vmid, callback);

openvz.getContainerInitLog(node, vmid, callback);

openvz.getContainerRRD(node, vmid, callback);

openvz.getContainerRRDData(node, vmid, callback);

openvz.deleteOpenvzContainer(node, vmid, callback);

openvz.setOpenvzContainerOptions(node, vmid, data, callback);

Qemu --- more info on permissions and data view the documentation.html

qemu.getStatus (node, qemu, callback);

qemu.getStatusCurrent (node, qemu, callback);

qemu.start(node, qemu, callback);

qemu.stop(node, qemu, callback);

qemu.reset(node, qemu, callback);

qemu.shutdown(node, qemu, callback);

qemu.suspend(node, qemu, callback);

qemu.resume(node, qemu, callback);

qemu.rrd(node, qemu, callback);

qemu.rrdData (node, qemu, callback);

qemu.getConfig(node, qemu, callback);

qemu.putConfig(node, qemu, data, callback);

qemu.postConfig(node, qemu, data, callback);

qemu.pending(node, qemu, callback);

qemu.unlink(node, qemu, data, callback);

qemu.vncproxy (node, qemu, callback);

qemu.vncwebsocket(node, qemu, data, callback);

qemu.sendkey(node, qemu, data, callback);

qemu.feature (node, qemu, data, callback);

qemu.clone (node, qemu, data, callback);

qemu.moveDisk (node, qemu, data, callback);

qemu.migrate (node, qemu, data, callback);

qemu.monitor (node, qemu, data, callback);

qemu.resize (node, qemu, data, callback);

qemu.template (node, qemu, callback);

snapshot

qemu.snapshot.list(node, qemu, callback);

qemu.snapshot.snapshot(node, qemu, snapname, callback);

qemu.snapshot.getConfig(node, qemu, snapname, callback);

qemu.snapshot.putConfig(node, qemu, snapname, data, callback);

qemu.snapshot.rollback(node,qemu, snapname, callback);

qemu.snapshot.delete(node, qemu, snapname, callback);

qemu.snapshot.make(node, qemu, data, callback);

firewall

qemu.firewall.list(node, qemu, callback);

qemu.firewall.listRules(node, qemu, callback);

qemu.firewall.createRule(node, qemu, data, callback);

qemu.firewall.getRule (node, qemu, pos, callback);

qemu.firewall.listAlias(node, qemu, callback);

qemu.firewall.createAlias(node, qemu, data, callback);

qemu.firewall.getAlias(node, qemu, name, callback);

qemu.firewall.updateAlias(node, qemu, name, data, callback);

qemu.firewall.listIpset(node, qemu, callback);

qemu.firewall.createIpset(node, qemu, data, callback);

qemu.firewall.getIpsetContent(node, qemu, name, callback);

qemu.firewall.addIpToIpset(node, qemu, name, data, callback);

qemu.firewall.deleteIpset(node, qemu, name, callback);

qemu.firewall.getIpfromIpset(node, qemu, name, cidr, callback);

qemu.firewall.updateIpfromIpset(node, qemu, name, cidr, data, callback);

qemu.firewall.deleteIpfromIpset(node, qemu, name, cidr, callback);

qemu.firewall.getOptions(node, qemu, callback);

qemu.firewall.setOptions(node, qemu, data, callback);

qemu.firewall.getLog(node, qemu, callback);

qemu.firewall.getRefs(node, qemu, callback);

network

network.list (node, callback);

network.create(node, data, callback);

network.get (node, iface, callback);

network.update (node, iface, data, callback);

network.delete (node, callback);

network.deleteIface (node, iface, callback);

access

access.listUsers (callback);

access.createUser (data, callback);

access.getUser(user, callback);

access.updateUser (user, data, callback);

access.deleteUser (user, callback);

access.listGroups (callback);

access.createGroup (data, callback);

access.getGroup (group, callback);

access.updateGroup (group, data, callback);

access.deleteGroup (group, callback);

access.listRoles (callback);

access.createRole (data, callback);

access.getRole (role, callback);

access.updateRole (role, data, callback);

access.deleteRole (role, callback);

access.listDomains (callback);

access.createDomain (data, callback);

access.getDomain (domain, callback);

access.updateDomain (domain, data, callback);

access.deleteDomain (domain, callback);

access.getAcl (callback);

access.updateAcl (data, callback);

access.getTicket (callback);

access.postTicket(data, callback);

access.password(data, callback);

pools

pools.list (callback);

pools.create (data, callback);

pools.get (pool, callback);

pools.update (pool, data, callback);

pools.delete (pool, callback);

storage

storage.list (callback);

storage.create (data, callback);

storage.get (storageId, callback);

storage.update (storageId, data, callback);

storage.delete (storageId, callback);

To Do:

completed tests, examples, documentation, add methods for pool, node, KVM