Skip to content
  • Auto
  • Light
  • Dark

List

List All Firewalls
get/v2/firewalls

To list all of the firewalls available on your account, send a GET request to /v2/firewalls.

Query Parameters
pagenumber
optional

Which 'page' of paginated results to return.

minimum1
per_pagenumber
optional

Number of items returned per page

minimum1
maximum200
Returns
metatotalnumberMetaProperties

Information about the response itself.

firewallsarray of idstringcreated_atstringdroplet_idsarray of numberinbound_rulesarray of objectnamestringoutbound_rulesarray of objectpending_changesarray of objectstatusenumtagsarray of stringFirewall
optional
curl https://api.digitalocean.com//v2/firewalls \
    -H "Authorization: Bearer $GRADIENTAI_API_KEY"
200 Example
{
  "meta": {
    "total": 1
  },
  "firewalls": [
    {
      "droplet_ids": [
        8043964
      ],
      "inbound_rules": [
        {
          "ports": "8000",
          "protocol": "tcp",
          "sources": {
            "addresses": [
              "1.2.3.4",
              "18.0.0.0/8"
            ],
            "droplet_ids": [
              8043964
            ],
            "kubernetes_ids": [
              "41b74c5d-9bd0-5555-5555-a57c495b81a3"
            ],
            "load_balancer_uids": [
              "4de7ac8b-495b-4884-9a69-1050c6793cd6"
            ],
            "tags": [
              "base-image",
              "prod"
            ]
          }
        }
      ],
      "name": "firewall",
      "outbound_rules": [
        {
          "destinations": {
            "addresses": [
              "1.2.3.4",
              "18.0.0.0/8"
            ],
            "droplet_ids": [
              8043964
            ],
            "kubernetes_ids": [
              "41b74c5d-9bd0-5555-5555-a57c495b81a3"
            ],
            "load_balancer_uids": [
              "4de7ac8b-495b-4884-9a69-1050c6793cd6"
            ],
            "tags": [
              "base-image",
              "prod"
            ]
          },
          "ports": "8000",
          "protocol": "tcp"
        }
      ],
      "tags": [
        "base-image",
        "prod"
      ]
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/images?page=2",
      "next": "https://api.digitalocean.com/v2/images?page=2"
    }
  }
}