2017 © Pedro Peláez
 

library mikrotikapi

Router Mikrotik API

image

ojisatriani/mikrotikapi

Router Mikrotik API

  • Friday, April 13, 2018
  • by ojisatriani
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 56 % Grown

The README.md

Mikrotik APi Laravel

Client API for RouterOS/Mikrotik, (*1)

Instalation

Via composer:, (*2)

composer require ojisatriani/mikrotikapi

Manual composer.json in require section:, (*3)

"require": {
    "ojisatriani/mikrotikapi": "dev-master", // <- this line
}

Basic Usage:

$php use OjiSatriani\MikrotikApi\Mikroji; $router = Mikroji::connect('192.168.3.1','user-api','user-api'); echo $router->ram() .'<br />'; // 1652.2 echo $router->hdd() .'<br />'; // 915.8 echo $router->cpu() .'<br />'; // 0 echo $router->rx('ether1') .'<br />'; // 1.85Kb/Mb/Gb/Tb echo $router->tx('ether1') .'<br />'; // 47.7Kb/Mb/Gb/Tb echo $router->rxInMb('ether1') .'<br />'; // 1.85 (view chart or graph) echo $router->txInMb('ether1') .'<br />'; // 47.70 (view chart or graph) echo json_encode($router->getInterface()) .'<br />'; // {"ether1":"ether1","ether2:ether2","ether3:ether3"} echo $router->command('log/print'); // return array(), (*4)

Mikrotik Wiki page at http://wiki.mikrotik.com/wiki/API_PHP_class, (*5)

https://github.com/BenMenking/routeros-api, (*6)

Configure API credentials

RouterOS Winbox, (*7)

  1. Enabling API.

Go to IP -> Services and enable api service., (*8)

  1. Creating API user.

Go to System -> Users, tab Groups. Create new group with permissions: api, read, write., (*9)

Then after group created go to tab Users and create new. Associate this user with group previously created., (*10)

Done., (*11)

The Versions

13/04 2018

dev-master

9999999-dev

Router Mikrotik API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Avatar ojisatriani

13/04 2018

1.0.3

1.0.3.0

Router Mikrotik API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Avatar ojisatriani

13/04 2018

1.0.2

1.0.2.0

Router Mikrotik API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Avatar ojisatriani

27/03 2018

1.0.1

1.0.1.0

Router Mikrotik API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Avatar ojisatriani

15/03 2018

1.0.0

1.0.0.0

Router Mikrotik API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Avatar ojisatriani