cPHulk
Management
Add login security record to list with comment
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.
post/batch_create_cphulk_records
Request body
Example request
{
"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"
}
]
}Response
HTTP Request was successful.
Example response
{
"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\""
},
"list_name": "white",
"original_ips_added": [
"192.168.0.1",
"192.168.1.0/30",
"122.1.56.7-122.1.56.8"
]
},
"metadata": {
"command": "batch_create_cphulk_records",
"reason": "OK",
"result": 1,
"version": 1
}
}