NRCHKB / node-red-contrib-unifi-os

Nodes to access UniFi data using endpoints and websockets
Apache License 2.0
27 stars 1 forks source link

How to enable/disable firewall rule? #31

Closed kgalilio closed 3 years ago

kgalilio commented 3 years ago

I am able to list all firewall rules using the unifi-request node and GET method. What I would like to do is enable/disable a firewall rule based on a trigger.

kgalilio commented 3 years ago

Please disregard. I was able to enable/disable the firewall rule by using the following:

/proxy/network/api/s/default/rest/firewallrule/{rule-id} using the PUT method and the following data:

{
    "enabled": true
}

This worked flawlessly