Question about applying firewall alias changes via API

Started by BondiBlueBalls, July 20, 2023, 01:29:06 PM

Previous topic - Next topic
Hey, all.

I'm working on a little tool to automatically update a specific alias related to port forwarding for another app. I'm currently using three of the firewall/alias endpoints (get, getAliasUUID, and setItem), and everything is working perfectly.

My only issue is that the changes don't seem to be applied (equivalent to pressing "apply" in the UI). Is there an endpoint for applying these changes, or is that what the firewall plugin is for? (firewall/filter_base/apply) After looking at the firewall plugin endpoints, I figured that was just for rules.

Any advice would be appreciated. Thanks much!

Turns out the "apply" button in the UI is equivalent to the "reconfigure" endpoint here: https://docs.opnsense.org/development/api/core/firewall.html

All set. Thanks!