Description

This function deletes a record or records from cPHulk's whitelist or blacklist.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/delete_cphulk_record?api.version=1&list_name=white&ip=192.168.0.1
https://hostname.example.com:2087/cpsess##########/xml-api/delete_cphulk_record?api.version=1&list_name=white&ip=192.168.0.1
whmapi1 delete_cphulk_record list_name=white ip=192.168.0.1

{
 "data": {
    "requester_ip": "10.0.0.0",
    "ips_removed": [
      "192.168.0.1"
    ],
    "ips_failed": {
       
    },
    "list_name": "white"
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "delete_cphulk_record"
  }
}
<result>
    <data>
        <requester_ip>10.0.0.0</requester_ip>
        <ips_removed>192.168.0.1</ips_removed>
        <ips_failed/>
        <list_name>white</list_name>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>delete_cphulk_record</command>
    </metadata>
</result>

Parameters

ParameterTypeDescriptionPossible valuesExample
list_namestring

Required

The cPHulk list's name.

  • black
  • white
white
ipstring

Required

The record's IP address.

To delete multiple IP addresses, increment the parameter name. For example, ip-1, ip-2, ip-3

A valid IP address.192.168.0.1

Returns

ReturnTypeDescriptionPossible valuesExample
requester_ipstringThe requester's IP address.A valid IP address.192.168.0.1

list_name

stringThe cPHulk list's name.
  • black
  • white
white
ips_removedarray of stringsAn array of the IP addresses that the function removed from the list.An array of IP addresses.192.168.0.1
ips_failedhashA hash of information about IP addresses that the system failed to add to the list.This hash contains one or more IP address returns. 

IP address

string

The reason why the system failed to add the IP address to the list.

The IP address is the return's name.

The function returns this value in the ips_failed hash.

A valid string.Invalid IP address or range "192.68.0.1"