'Error "no such command" executing command
Opened this issue · 1 comments
eoporto commented
Miktortik CLI command: /ip hotspot user print where name=User1"
Applied using code below:
api.get_binary_resource('/').call('ip/hotspot/user/print/where', {'name' : 'User1'})
Error:
routeros_api.exceptions.RouterOsApiCommunicationError: ('Error "no such command" executing command /ip/hotspot/user/print/where =name=User1 .tag=3', 'no such command')
What is the correct way to implement the CLI command to python code?
Thank you.
crbertoldo commented
https://wiki.mikrotik.com/wiki/API_command_notes
E.g. /ip/address/print
:
ip_addresses = api.get_resource('/ip/address') # do not put print baucase it will cause redundancy
print(ip_addresses.get())