Rulesets API

This guide is for the Rulesets API, used to control your WAF IP and WAF ID based rulesets. Please see the API overview for information on using the Nova API.


Examples

List Rules

This will return a list of your rulesets, allowed and denied/blocked.

Variables

Method: GET
Endpoint: /api/rulesets/{what}

Variables:
 - what: ips|waf-rules

Response

{
    "success": true,
    "data": {
        "allowed": [
            "192.168.99.0/24",
            "192.168.10.53/32"
        ],
        "blocked": [
            "127.0.0.99",
            "127.0.0.100"
        ]
    }
}

Add an IP

Add an IP to either the allowed or blocked IP list.

Variables

Method: POST
Endpoint: /api/rulesets/addIp

Variables: 
 - list: allowed|blocked
 - ip: IP or IP/CIDR

Response

{
    "success": true,
    "data": {
        "message": "The allowed list was updated to add 192.168.10.53/32"
    }
}

Remove an IP

Remove an IP from either the allowed or blocked IP list.

Variables

Method: POST
Endpoint: /api/rulesets/removeIp

Variables: 
 - list: allowed|blocked
 - ip: IP or IP/CIDR

Response

{
    "success": true,
    "data": {
        "message": "The allowed list was updated to remove 192.168.10.50/32"
    }
}

Deploy changes

To apply these changes to all relevant ADCs you must run a deploy via the API.

Variables

Method: POST
Endpoint: /api/rulesets/deploy

Response

{
    "success": true,
    "data": {
        "message": "Your WAF rules have been deployed to 1 ADC(s)."
    }
}