@uconn-its/infoblox-rest
v0.0.6
Published
Simple Infoblox REST API client for NodeJS
Downloads
2
Readme
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;
- Make sure your git directory is clean by commiting or stashing all changes.
- Move the
.env.example
to.env
and change theNPMRC_TOKEN
variable to a token with access to@uconn-its
(Found in LastPass underITS WebDev -- NPM/uconn-its NPM Access Token
). - Increment the package version by either manually changing the
package.json
file or runningnpm version <major/minor/patch>
. - Publish the package to the registry by running
npm publish
. (Note: If you get a 404 error, simply runnpm publish
again.)