Skip to content

behindcurtain3/vcenter-rest-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vcenter-rest-client

A library to easily interact with vCenter REST API.

Example

import { VCenterRestClient } from 'vcenter-rest-client';
import https from "https";

// Use this agent if you have a self-signed certificate on vCenter
const agent = new https.Agent({
    rejectUnauthorized: false
});
const host = "https://your-vcenter-host";
const apiClient = new VCenterRestClient(agent, host);

try {
    await apiClient.login("username", "password");
} catch(error) {
    console.error(error.message);
}

// Get all VMs
let virtualMachines = await apiClient.get("rest/vcenter/vm");

// Get all Hosts
let hosts = await apiClient.get("rest/vcenter/host");

About

A library to easily interact with vCenter REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published