GET
/
waap
/
v1
/
domains
/
{domain_id}
/
advanced-rules
/
{rule_id}
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
advanced_rule = client.waap.domains.advanced_rules.get(
    rule_id=0,
    domain_id=0,
)
print(advanced_rule.id)
{
  "name": "<string>",
  "description": "<string>",
  "enabled": true,
  "action": {
    "allow": {},
    "block": {
      "status_code": 403,
      "action_duration": "12h"
    },
    "captcha": {},
    "handshake": {},
    "monitor": {},
    "tag": {
      "tags": [
        "<string>"
      ]
    }
  },
  "source": "request.rate_limit([], '.*events', 5, 200, [], [], '', 'ip') and not ('mb-web-ui' in request.headers['Cookie'] or 'mb-mobile-ios' in request.headers['Cookie'] or 'session-token' in request.headers['Cookie']) and not request.headers['session']",
  "phase": "access",
  "id": 123
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

domain_id
integer
required

The domain ID

rule_id
integer
required

The advanced rule ID

Response

200
application/json

Successful Response

An advanced WAAP rule applied to a domain