socialwifi / RouterOS-api

Python API to RouterBoard devices produced by MikroTik.
MIT License
251 stars 100 forks source link

How to send .proplist param? #54

Open evpamex opened 4 years ago

evpamex commented 4 years ago

Please explain how can I send filter .proplist with API requests?

This is not working: list_address = api.get_resource('/interface') pprint(list_address.get(.proplist="name"))

originar API requests would look like this: <<< /interface/print <<< =.proplist=name

evpamex commented 4 years ago

and this also not working: list_address = api.get_resource('/interface') pprint(list_address.get(proplist="name")) # without dot

I just get empty output.

Matroskin-omsk commented 4 years ago

hello there is a solution?

mlow commented 4 years ago

There is a solution.

queues = api.get_resource('/queue/simple')
queues.call('print', { '.proplist': '.id,name,target' }, { 'max-limit': '1000000/100000' })