@uconn-its/infoblox-rest

0.0.6 • Public • Published

Simple Infoblox REST API client for NodeJS

https://www.infoblox.com/wp-content/uploads/infoblox-deployment-infoblox-rest-api.pdf

Install

npm install --save infoblox-rest

Run

You can use your usual proxy environment variables. Request, behind this library will pick it up.

(async () => {
 
  const infoblox = require("infoblox-rest");
  const cli = infoblox({
    // configure your infoblox host, login and password
    url: "https://localhost",
    user: "usern4me",
    pass: "passw0rd",
    // Check following url to know which wapi versions your infoblox installation supports
    // https://localhost/wapi/v1.0/?_schema
    version: "v2.9",
    timeout: 30000
  });

  // get supported wapi versions
  const res = await cli.request({method: 'GET', uri: `?_schema`});
  return res.data.supported_versions;
})()
.then(data => {
  console.log("done", data)
})
.catch(err => {
  console.log("error", err)
})

output similar to this

done [
  '1.0',   '1.1',   '1.2',   '1.2.1',
  '1.3',   '1.4',   '1.4.1', '1.4.2',
  '1.5',   '1.6',   '1.6.1', '1.7',
  '1.7.1', '1.7.2', '1.7.3', '1.7.4',
  '1.7.5', '2.0',   '2.1',   '2.1.1',
  '2.1.2', '2.2',   '2.2.1', '2.2.2',
  '2.3',   '2.3.1', '2.4',   '2.5',
  '2.6',   '2.6.1', '2.7',   '2.7.1',
  '2.7.2', '2.7.3', '2.8'
]

Publishing

To publish an update to this package follow these steps;

  1. Make sure your git directory is clean by commiting or stashing all changes.
  2. Move the .env.example to .envand change the NPMRC_TOKEN variable to a token with access to @uconn-its (Found in LastPass under ITS WebDev -- NPM/uconn-its NPM Access Token).
  3. Increment the package version by either manually changing the package.json file or running npm version <major/minor/patch>.
  4. Publish the package to the registry by running npm publish. (Note: If you get a 404 error, simply run npm publish again.)

Readme

Keywords

none

Package Sidebar

Install

npm i @uconn-its/infoblox-rest

Weekly Downloads

2

Version

0.0.6

License

UNLICENSED

Unpacked Size

7.17 kB

Total Files

7

Last publish

Collaborators

  • jpr21010work