-----Original Message----- From: Public [mailto:public-bounces@talk.mikrotik.com.au] On Behalf Of Paul Julian Sent: Wednesday, 14 May 2014 9:43 PM To: 'MikroTik Australia Public List' Subject: Re: [MT-AU Public] API Wildcard search
Hey Mike, does this syntax actually work when doing the find in the CLI on
router itself ?
Regards Paul
-----Original Message----- From: Public [mailto:public-bounces@talk.mikrotik.com.au] On Behalf Of Mike Everest Sent: Wednesday, 14 May 2014 9:29 PM To: 'MikroTik Australia Public List' Subject: Re: [MT-AU Public] API Wildcard search
Hi folks!
Further to my original post (below) I have had some further correspondence with MT (Janis K) regarding these questions, but really getting nowhere useful yet ;-)
At least I have been able to confirm that there is no wildcard or regex feature in API query structure (apparently 'regex is not available via API in any
That's a good question - I don't know the answer to that, though I suspect that shell has some other feature set in there because with 'print', for example, there is 'where' operator that works like sql where clause. I'll have to give it a go and see what happens! :-D Cheers, Mike. the form' ;-)
and the suggested approach is to download the entire data to the client and parse client side, which is quite a PITA for the implementation that we are building here :(
I am yet to get any sensible description of how the operators '<' and '>' actually work on text at all (i.e. is it like strcmp kind of functionality, or something else?) but taking my usual tack when dealing with MT support and just repeating the question over and over until they offer an answer that addresses the actual question! :-D
When I get such a result, I will post again to this thread for prosperity of all!
Cheers, Mike.
-----Original Message----- From: Public [mailto:public-bounces@talk.mikrotik.com.au] On Behalf Of Mike Everest Sent: Sunday, 27 April 2014 10:37 AM To: public@talk.mikrotik.com.au Subject: [MT-AU Public] API Wildcard search
Hi folks,
Anyone have some experience using routerOS API?
I've been extending the configuration group functionality of our DuxTel Commander, and come up against a challenge in filtering API query (http://wiki.mikrotik.com/wiki/API#Queries)
The deal is that I use 'comment' field as a way to cross-reference router configuration entries with the configuration database items. For example, a firewall rule might look like:
ip firewall filter add chain=forward src-address-list=blocked action=drop comment='Managed by DuxAdmin SetID:443 ItemID:27'
So when I want to find all the firewall rules with SetID:443, I can do this:
/ip/firewall/filter/find ?>comment=Managed by DuxAdmin SetID:443
Which seems to work OK, but I can't work out how to return just those entries that include 'ItemID:27'
I'll put the question to MT support and post a solution (if there is one) if/when they respond, but if anyone has some suggestions, I'm 'all ears'! ;-)
Cheers, Mike.
_______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au
----- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4570 / Virus Database: 3931/7437 - Release Date: 05/03/14 Internal Virus Database is out of date.
_______________________________________________ Public mailing list Public@talk.mikrotik.com.au http://talk.mikrotik.com.au/mailman/listinfo/public_talk.mikrotik.com.au