tevaum / node-phpipam

phpIPAM client library written in JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-phpipam

A simple library to aceess phpIPAM API.

To use this library you will need:

  • A running phpIPAM (duhh)
  • An App ID (that you can create under the Administration : API menu)
  • A valid username and password to retrieve and renew the token

For API details, take a look at the official API documentation.

It currently implements login, token renewal and GET requests. Bug reports, feature and pull requests are welcome!

Tests are not implemented yet :P

Usage

var IPAM = require('node-phpipam');

let proxy = IPAM({
    uri: 'https://your_phpipam_site/api',
    appname: 'appname',
    username: 'username',
    password: 'password'
});

proxy.get('addresses/search_hostname/core')
    .then((addrs) => {
	    console.log('OK:', addrs);
    })
    .catch((err) => {
	    console.error('Erro:', err);
    });

Usage (es6)

import IPAM from 'node-phpipam';

let proxy = IPAM({
    uri: 'https://your_phpipam_site/api',
    appname: 'appname',
    username: 'username',
    password: 'password'
});

proxy.get('addresses/search_hostname/core')
    .then((addrs) => {
	    console.log('OK:', addrs);
    })
    .catch((err) => {
	    console.error('Error:', err);
    });

About

phpIPAM client library written in JavaScript


Languages

Language:JavaScript 100.0%