GET /rules

Retrieve firewall rules

Returns a list of firewall rules with pagination and filtering options.

Parameters

NameTypeInDescription
page
integerqueryPage number for pagination
filter
stringqueryFilter string to search for specific rules
limit
integerqueryNumber of rules to return per page

Response

200
dataobject
limitinteger
rulesarray
totalinteger
pageinteger

Current page number

successboolean

Request

curl -X GET "https://shield.royalehosting.net/api/v2/rules" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-organization-id: YOUR_ORG_ID"

Response

{
  "data": {
    "limit": 15,
    "rules": [
      {
        "id": 123,
        "destination": "1.1.1.1/32",
        "action": "permit",
        "note": "Example Rule",
        "protocol": 17,
        "source": "1.1.1.1/32",
        "order": 11,
        "disabled": false,
        "last_rule_update": "2024-08-25T21:39:57.5+02:00",
        "src_port_type": "eq",
        "dst_port_type": "eq",
        "matched_packets": 238428,
        "group_id": 0,
        "updated_at": "2024-08-25T21:39:37.439+02:00"
      }
    ],
    "total": 5,
    "page": 0
  },
  "success": true
}