GET
/
waap
/
v1
/
domains
/
{domain_id}
/
advanced-rules
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.advanced_rules.list(
    domain_id=0,
)
page = page.results[0]
print(page.id)
{
  "limit": 123,
  "offset": 123,
  "count": 123,
  "results": [
    {
      "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

Query Parameters

ordering
enum<string> | null

Determine the field to order results by

Available options:
id,
name,
description,
enabled,
action,
phase,
-id,
-name,
-description,
-enabled,
-action,
-phase
limit
integer
default:100

Number of items to return

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

Number of items to skip

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

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

description
string

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

action
enum<string>

Filter to refine results by specific actions

Available options:
allow,
block,
captcha,
handshake,
monitor,
tag
enabled
boolean

Filter rules based on their active status

phase
enum<string>

Filter rules based on the WAAP request/response phase for applying the rule. The "access" phase is responsible for modifying the request before it is sent to the origin server. The "header_filter" phase is responsible for modifying the HTTP headers of a response before they are sent back to the client. The "body_filter" phase is responsible for modifying the body of a response before it is sent back to the client.

Available options:
access,
header_filter,
body_filter

Response

200
application/json

Successful Response

The response is of type object.