---
title: "Get flow rules"
method: GET
path: "/api/v2beta/network/{id}/flow-rule"
tags: ["network"]
---

# Get flow rules

`GET /api/v2beta/network/{id}/flow-rule`

## Request

- Base URL: `https://central.zerotier.com`
- URL: `https://central.zerotier.com/api/v2beta/network/{id}/flow-rule`
- Auth: HTTP bearer

Retrieve the current flow rules for a network. Flow rules control how traffic is routed between devices. **This endpoint is in beta and may change.**

## Path parameters

- `id` string, required

## Response `200`

Flow rules for the network

- union
  - FlowRulesCustom
    - `kind` 'custom', required: The kind of flow rule
    - `config` FlowRulesCustomConfig, required
      - `source` string, required: Raw ZeroTier flow rule source code
  - FlowRulesIsolation
    - `kind` 'isolation', required: The kind of flow rule
    - `config` FlowRulesIsolationConfig, required
      - `blockNonIP` boolean, required: Whether to block non-IP traffic (e.g. ARP, IPv6 NDP)
      - `enableServiceFilter` boolean, required: Whether to restrict traffic to only the ports and protocols in `allowedServices`
      - `allowedServices` FlowRuleIsolationAllowedPorts[], required: Ports and protocols to allow when service filtering is enabled
        - `ports` string, required: Port list in ZeroTier format: single port (`80`), range (`8000-9000`), or comma-separated
        - `protocol` integer, required: IP protocol number (e.g. 6 = TCP, 17 = UDP, 1 = ICMP)
      - `excludedDeviceIds` string[], required: Device IDs exempt from isolation rules (can communicate freely)

## Other responses

- `401`: Missing or invalid authentication token
- `403`: Insufficient permissions
- `404`: Network not found
- `500`: Internal server error

---

[API](https://skmtc.dev/zerotier/apis/zerotier-central-v2-api.md) - [All operations](https://skmtc.dev/zerotier/apis/zerotier-central-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zerotier/apis/zerotier-central-v2-api/revisions/b2e7468ad104?raw)
