List firewall policies
unifi_list_firewall_policiesList zone-based firewall policies for a UniFi site, returning rule details, actions, zones, protocols, and metadata to audit or manage traffic filtering.
Instructions
List firewall policies (zone-based rules) at a site. Returns: id, name, enabled, action (object with type field), source/destination (zone reference + trafficFilter), ipProtocolScope, connectionStateFilter, ipsecFilter, schedule, loggingEnabled, reportFlowEnabled (Insights Flows reporting; false on the predefined Allow Return Traffic and Block policies), index, description, metadata (origin SYSTEM_DEFINED/USER_DEFINED/DERIVED, configurable on system policies). action is {type: ALLOW|BLOCK, allowReturnTraffic on ALLOW}. The protocol lives in ipProtocolScope.protocolFilter (NAMED_PROTOCOL or PRESET); ports and addresses live in source/destination.trafficFilter, which is omitted when a side matches the whole zone. Unset optional fields (ipsecFilter, schedule, connectionStateFilter) are omitted, not null. Evaluation order within a zone pair comes from unifi_get_firewall_policy_ordering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of records to return (API default: 25) | |
| filter | No | Filter expression, e.g. metadata.origin.eq('USER_DEFINED') or name.eq('Allow Return Traffic'). Boolean fields (enabled, loggingEnabled, reportFlowEnabled) are not filterable | |
| offset | No | Number of records to skip | |
| siteId | Yes | Site ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| count | No | ||
| limit | No | ||
| offset | No | ||
| totalCount | No |