This function adds one or more records to cPHulk's whitelist or blacklist. The function includes the option to add unique comments for each IP address that you add.
HTTP Request was successful.
object | |
object |
{- "api.version": 1,
- "list_name": "white",
- "records": [
- {
- "comment": "Automated update tools.",
- "ip": "192.168.0.1"
}, - {
- "comment": "System administrators and support systems.",
- "ip": "192.168.1.0/30"
}, - {
- "comment": "Owner of example.com.",
- "ip": "122.1.56.7-122.1.56.8"
}, - {
- "comment": "Special access group 1",
- "ip": "2001:db9::"
}, - {
- "comment": "Special access group 1",
- "ip": "2001:db9::1-2001:db9::5"
}, - {
- "comment": "Special access group 2",
- "ip": "2001:db8::/32"
}
]
}
{- "data": {
- "comment": "George Wendt flying through the air.",
- "ip_blocks_removed": 1,
- "ips_added": [
- "192.168.0.1",
- "192.168.1.0-192.168.1.3",
- "122.1.56.7-122.1.56.8"
], - "ips_failed": {
- "192.168.0.1": "Invalid IP address or range: \"192.68.0.1\""
}, - "iptable_bans_removed": 0,
- "list_name": "white",
- "original_ips_added": [
- "192.168.0.1",
- "192.168.1.0/30",
- "122.1.56.7-122.1.56.8"
], - "requester_ip": "10.1.4.228",
- "requester_ip_is_whitelisted": 0
}, - "metadata": {
- "command": "batch_create_cphulk_records",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}