---
title: pydo.firewalls.list()
description: List All Firewalls
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/firewalls/list/
last_updated: "2026-10-01"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.firewalls.list()

Generated on 1 Oct 2026 from `pydo` version [`v0.43.0`](https://github.com/digitalocean/pydo/releases/tag/v0.43.0v0.43.0)

## Usage

```python
client.firewalls.list(per_page=20, page=1)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To list all of the firewalls available on your account, send a GET request to [`/v2/firewalls`](https://docs.digitalocean.com/reference/api/reference/firewalls/index.html.md#firewalls_list).

## Parameters

`per_page` integer optional

Number of items returned per page

Min: `1`

Max: `200`

Default: `20`

`page` integer optional

Which 'page' of paginated results to return.

Min: `1`

Default: `1`

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.firewalls.list()
```

## Pagination

This method returns paginated results. The response includes a `links.pages` object with URLs for navigating between pages. To retrieve the next page, parse the `next` URL and pass the `page` parameter:

```python
from urllib.parse import urlparse, parse_qs

resp = client.firewalls.list()
pages = resp.get("links", {}).get("pages", {})

while "next" in pages:
    parsed = urlparse(pages["next"])
    page = int(parse_qs(parsed.query)["page"][0])
    resp = client.firewalls.list(page=page)
    pages = resp.get("links", {}).get("pages", {})
```

## Response Example

## Show Response Example

```json
{
  "firewalls": [
    {
      "id": "fb6045f1-cf1d-4ca3-bfac-18832663025b",
      "name": "firewall",
      "status": "succeeded",
      "inbound_rules": [
        {
          "protocol": "tcp",
          "ports": "80",
          "action": "allow",
          "sources": {
            "load_balancer_uids": [
              "4de7ac8b-495b-4884-9a69-1050c6793cd6"
            ]
          }
        },
        {
          "protocol": "tcp",
          "ports": "22",
          "action": "allow",
          "sources": {
            "tags": [
              "gateway"
            ],
            "addresses": [
              "18.0.0.0/8"
            ]
          }
        }
      ],
      "outbound_rules": [
        {
          "protocol": "tcp",
          "ports": "80",
          "action": "allow",
          "destinations": {
            "addresses": [
              "0.0.0.0/0",
              "::/0"
            ]
          }
        }
      ],
      "created_at": "2017-05-23T21:23:59Z",
      "droplet_ids": [
        8043964
      ],
      "tags": [],
      "pending_changes": []
    }
  ],
  "links": {},
  "meta": {
    "total": 1
  }
}
```

## More Information

See [`/v2/firewalls`](https://docs.digitalocean.com/reference/api/reference/firewalls/index.html.md#firewalls_list) in the API reference for additional detail on responses, headers, parameters, and more.