Is possible to create api to log in router, disable queue simple…?
can anybody help to create it?
thanks
Using which API client?
With my PHP client, it would be as simple as
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b4.phar';
$client = new RouterOS\Client('routerip', 'admin', 'password');
$client->sendSync(new RouterOS\Request('/queue simple disable numbers=queueName'));
Where “queueName” is the name of the queue you want disabled.
It would be similar using other API clients… Perhaps with a few more lines of code, but still trivial.
I want to use it from routeros to routeros, what client will be ideal (simple and working in this case?)
You can’t. RouterOS does not have an API client, and you can’t install any external applications on it.
You’d need a separate non-RouterOS device (e.g. a web server, or just some workstation) to contain and run the application.
thanks, I just realized that I can use SSH:)
use SSH:) ![]()
but problem is that it cant be used in script..also telnet…can anybody help how to connect from one routeros device to another one using script?
You could use fetch and upload something.auto.rsc file from the first router to the second via FTP. The script is automatically executed after upload. Docs here.
This example is more complicated than what you want, but at it’s core is doing what I described above.
http://forum.mikrotik.com/t/copy-address-entrys-to-second-router/61910/1