Closed andreytsushima closed 6 years ago
Hello,
I do not know what is "tool/wol", but follow this:
wol = api.get_resource("/tool/wol")
wol_intreface = wol.get(interface="bridge-lan", mac=str(mac))
This the wiki https://github.com/socialwifi/RouterOS-api/wiki/How-to-use
Regards.
Hello, first of all the api is great second excusme for my english is not my native language. I have the same problem, wol is a function that take two parameters to wake up a pc on your lan. The same thing happends with the monitor-traffic inside interface, i can't monitor an interface in real time. When i run monitor= api.get_resource("/interface/monitor-traffic") monitor.get(interface='ether1') This raises the next error (Error "no such command" executing command b\ '/interface/monitor-traffic/print ?interface=LAN .tag=3\ ''no such command')
Thanks in advance
I've added a section on the wiki with an example of how I managed to do this.
api.get_binary_resource('/').call('tool/fetch',{ 'url': "https://github.com" })
Excellent just pass your key values as binary and works perfect. Greets from Argentina
Closing this as we have this documented now. https://github.com/socialwifi/RouterOS-api/wiki/How-to-use#execute-commands Thanks @stevehaskew and @oortega!
Hi, how can i send a command with args like api.get_resource('/tool/wol/interface=bridge-lan, mac='+str(mac)) Thanks