Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15172

Scripting • How using .query stack in REST API?

$
0
0
How to work with query stack in REST API?
For example, print address lists with condition:
/ip firewall address-list print where (list=a or list=b or list=c) and address=d
in REST API like this POST request /rest/ip/firewall/address-list/print
{".query": ["list=a","list=b","#|","list=c","#|","address=d","#&"]}

How to create a condition with brackets like this expression?
/ip firewall address-list print where (list=a or list=b or list=c) and (address=d or comment=d)
The documentation says that can access the query stack using indexes, but I don’t understand how it works.

Statistics: Posted by DenSyo77 — Fri Feb 02, 2024 4:11 am



Viewing all articles
Browse latest Browse all 15172

Trending Articles