cPHulk
Management
Add login security record to list
This function adds a new record or records to cPHulk's whitelist or blacklist.
get/create_cphulk_record
Query parameters
The record's IP address, if there is only one IP address to add.
Note:
To add multiple IP addresses, increment the parameter name. For example, ip-1, ip-2, and ip-3.
[ "192.168.0.1" ]
list_name'black' | 'white' required
Example:white
The cPHulk list's name.
- black - Add a new record or records to the blacklist.
- white - Add a new record or records to the whitelist.
commentstring
Example:George Wendt flying through the air.
A comment to include.
skip_enabled_check0 | 1
Example:1
Whether to skip checking if cPHulk runs on the server.
- 1 - Do not check if cPHulk is running.
- 0 - Check if cPHulk is running.
Note:
If cPHulk is disabled and you check its status, the function returns the following message: cPHulk is disabled on the server.
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"
],
"ips_failed": {
"192.168.0.1": "Invalid IP address or range: \"192.68.0.1\""
},
"list_name": "white"
},
"metadata": {
"command": "create_cphulk_record",
"reason": "OK",
"result": 1,
"version": 1
}
}