opn_items
Search, add, update, delete, or toggle OPNsense model items by controller and item type, with optional apply and confirmed deletion for safe firewall and service changes.
Instructions
Work with the items of any OPNsense model controller. controller + item name the endpoints: ("firewall/alias", "item") -> firewall/alias/search_item, add_item, ...; ("firewall/filter", "rule"), ("firewall/d_nat", "rule"), ("unbound/settings", "host_override"), ("dnsmasq/settings", "host"), ("kea/dhcpv4", "reservation"), ("nginx/settings", "upstream"). data holds just the item's fields (see opn_api_describe on the add_ endpoint). apply=true runs the controller's apply/reconfigure afterwards; for firewall rules that arms the auto-revert (confirm with opn_firewall_confirm). del needs confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| item | Yes | ||
| rows | No | ||
| uuid | No | ||
| apply | No | ||
| action | No | search | |
| search | No | ||
| confirm | No | ||
| dry_run | No | ||
| enabled | No | ||
| controller | Yes |