go-unifi

List Firewall Policies

Retrieve a list of all firewall policies on a site. <details> <summary>Filterable properties (click to expand)</summary> |Name|Type|Allowed functions| |-|-|-| |`id`|`UUID`|`eq` `ne` `in` `notIn`| |`name`|`STRING`|`eq` `ne` `in` `notIn` `like`| |`source.zoneId`|`UUID`|`eq` `ne` `in` `notIn`| |`destination.zoneId`|`UUID`|`eq` `ne` `in` `notIn`| |`metadata.origin`|`STRING`|`eq` `ne` `in` `notIn`| </details>

GET
/v1/sites/{siteId}/firewall/policies

Retrieve a list of all firewall policies on a site.

NameTypeAllowed functions
idUUIDeq ne in notIn
nameSTRINGeq ne in notIn like
source.zoneIdUUIDeq ne in notIn
destination.zoneIdUUIDeq ne in notIn
metadata.originSTRINGeq ne in notIn
X-Api-Key<token>

UniFi API key. Create one under Control Plane → Admins & Users → your admin → Create API Key (requires controller 9.0.114+).

In: header

Path Parameters

siteId*string

Query Parameters

offset?integer
limit?integer
filter?string

Response Body

application/json

curl -X GET "https://example.com/v1/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/firewall/policies"
{  "offset": 0,  "limit": 25,  "count": 10,  "totalCount": 1000,  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "enabled": true,      "name": "My firewall policy",      "description": "A description for my firewall policy",      "index": 0,      "action": {        "type": "string"      },      "source": {        "zoneId": "c3920607-5069-4ac3-ba10-00754e7a8e8b",        "trafficFilter": {          "type": "string"        }      },      "destination": {        "zoneId": "c3920607-5069-4ac3-ba10-00754e7a8e8b",        "trafficFilter": {          "type": "string"        }      },      "ipProtocolScope": {        "ipVersion": "string"      },      "connectionStateFilter": [        "NEW"      ],      "ipsecFilter": "MATCH_ENCRYPTED",      "loggingEnabled": true,      "schedule": {        "mode": "string"      },      "metadata": {        "origin": "string"      }    }  ]}