mikroapi

2.0.1 • Public • Published

mikroapi

Minimalist Mikrotik API client

Why

The JavaScript client recommended on the wiki doesn't properly specify its dependencies.

How

Just a very basic port of the python implementation shown on the wiki.

Example

const api = new MikroApi({
	host: '1.1.1.1',
	port: 8729,
	username: 'admin',
	password: 'xxx',
	tls: {
		rejectUnauthorized: false // maybe don't do this
	}
})
await api.connect()
const res = await api.exec('/routing/bgp/peer/print', {
	'.proplist': 'prefix-count,disabled,state,uptime,remote-as,remote-address'
})
console.log(res)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mikroapi

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

6.22 kB

Total Files

3

Last publish

Collaborators

  • jessetane