Return login security list records

This function displays a cPHulk list's records.

SecurityBasicAuth
Request
query Parameters
list_name
required
string

The cPHulk list's name.

  • black
  • white
Enum: "black" "white"
Example: list_name=white
skip_enabled_check
integer
Default: 0

Whether to skip checking if cPHulk runs on the server.

Note:

If cPHulk is disabled, the function returns the following message: cPHulk is disabled on the server.

Enum: 0 1
Example: skip_enabled_check=1
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/read_cphulk_records
Request samples
whmapi1 --output=jsonpretty \
  read_cphulk_records \
  list_name='white'
Response samples
application/json
{
  • "data": {
    • "ips_in_list": {
      • "10.1.4.44": "A helpful comment about the IP address.",
      • "DEED::1": "A helpful comment about the IP address."
      },
    • "list_name": "white",
    • "requester_ip": "10.1.4.228",
    • "requester_ip_is_whitelisted": 1,
    • "restart_ssh": 1,
    • "warning_ip": "The IP address is not on the white list.",
    • "warning_ssh": "The system disabled the UseDNS setting for sshd in order to add IP addresses to the whitelist. You must restart sshd to implement the change."
    },
  • "metadata": {
    • "command": "read_cphulk_records",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}