lory
1
Hello, I want to get status of firewall rule with rest api.
With ssh i can do it:
ssh 10.0.0.1 ‘/put [/ip/firewall/raw/get [find where src-mac-address=“64:FF:0A:CD:DA:12”] disabled]’
false
If this is imposible, i have script wich returns status ot rule, but i can not execute script via rest api and get output.
Please help.
mrz
2
:put ([/tool fetch url="https://192.168.88.1/rest/ip/firewall/raw?src-mac-address=64:FF:0A:CD:DA:12&.proplist=disabled" \
user=admin password="" as-value output=user]->"data")
You have as result something like
[{“.id”:“*1”,“disabled”:“false”}]
or
[{“.id”:“*1”,“disabled”:“true”}]