@vcd/node-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

VMware Cloud Director Client bindings for NodeJS

The Javascript clients for VMware Cloud Director is implemented in typescript, but can be called from either Javascript or Typescript.

The client is implemented for server-side use with node using the request library.

Installation

npm install @vcd/node-client

Example code

Login and save configuration

import * as vcd from '@vcd/node-client'

const vcdConfig = new vcd.CloudDirectorConfig();
const config = await vcd.CloudDirectorConfig.withUsernameAndPassword(
    "https://<host>[:<port>]/cloudapi",
    "myusername",
    "System", // for Provider login use System as organization name
    "myfakepassword"
)
config.saveConfig("alias")

List all orgs

import * as vcd from '@vcd/node-client'

const vcdConfig = CloudDirectorConfig.fromDefault()

const orgApi: vcd.OrgApi = vcdConfig.makeApiClient(vcd.OrgApi)

orgApi.queryOrgs(1, 128).then((res) => {
    console.log(res.body);
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.6-alpha.20next
0.0.50latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.6-alpha.20
0.0.6-alpha.10
0.0.6-alpha.00
0.0.6-alpha0
0.0.50
0.0.5-alpha.60
0.0.5-alpha.50
0.0.5-alpha.40
0.0.5-alpha.30
0.0.5-alpha.20
0.0.5-alpha.10
0.0.5-alpha.00

Package Sidebar

Install

npm i @vcd/node-client

Weekly Downloads

0

Version

0.0.5

License

BSD-2

Unpacked Size

4.63 MB

Total Files

34

Last publish

Collaborators

  • cd-extensions
  • nvladimirovi
  • jmoroski
  • juanito.bsb