Skip to main content
GET
/
waap
/
v1
/
domains
/
{domain_id}
/
firewall-rules
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
page = client.waap.domains.firewall_rules.list(
    domain_id=1,
)
page = page.results[0]
print(page.id)
{
  "limit": 123,
  "offset": 123,
  "count": 123,
  "results": [
    {
      "name": "<string>",
      "enabled": true,
      "action": {
        "allow": {},
        "block": {
          "status_code": 403,
          "action_duration": "<string>"
        }
      },
      "conditions": [
        {
          "ip": {
            "ip_address": "<string>",
            "negation": false
          },
          "ip_range": {
            "lower_bound": "<string>",
            "upper_bound": "<string>",
            "negation": false
          }
        }
      ],
      "id": 123,
      "description": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

domain_id
integer
required

The domain ID The domain ID

Query Parameters

ordering
enum<string> | null

Determine the field to order results by Determine the field to order results by

Available options:
id,
name,
description,
enabled,
action,
-id,
-name,
-description,
-enabled,
-action
Example:

"-id"

limit
integer
default:100

Number of items to return Number of items to return

Required range: 0 <= x <= 100
offset
integer
default:0

Number of items to skip Number of items to skip

Required range: 0 <= x <= 100000
name
string

Filter rules based on their name. Supports '' as a wildcard character. Filter rules based on their name. Supports '' as a wildcard character.

description
string

Filter rules based on their description. Supports '' as a wildcard character. Filter rules based on their description. Supports '' as a wildcard character.

action
enum<string>

Filter to refine results by specific firewall actions Filter to refine results by specific firewall actions

Available options:
allow,
block
enabled
boolean

Filter rules based on their active status Filter rules based on their active status

Response

Successful Response

limit
integer
required

Number of items requested in the response

offset
integer
required

Items response offset used

count
integer
required

Number of items contain in the response

results
FirewallRuleResponse · object[]
required

List of items returned in the response following given criteria