Skip to main content
GET
/
waap
/
v1
/
domains
/
{domain_id}
/
firewall-rules
/
{rule_id}
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
)
waap_firewall_rule = client.waap.domains.firewall_rules.get(
    rule_id=0,
    domain_id=1,
)
print(waap_firewall_rule.id)
{
  "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

rule_id
integer
required

The firewall rule ID The firewall rule ID

Response

Successful Response

name
string
required

The name assigned to the rule

Required string length: 1 - 100
enabled
boolean
required

Whether or not the rule is enabled

action
FirewallRuleAction · object
required

The action that the rule takes when triggered

conditions
FirewallRuleCondition · object[]
required

The condition required for the WAAP engine to trigger the rule.

Required array length: 1 element
id
integer
required

The unique identifier of the rule

description
string

The description assigned to the rule

Maximum string length: 100