Description

This function deletes a DNS zone record.


Incorrect use of this function could cause domains to resolve incorrectly. Excercise extreme caution when you remove DNS zone records.

To effectively use this function, use the following workflow:

  1. Run the dumpzone function.
  2. Locate the Line value that corresponds to the zone record to delete.
  3. Use the values from that zone record to formulate the appropriate removezonerecord parameters.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/removezonerecord?api.version=1&zone=example.com&line=4




https://hostname.example.com:2087/cpsess##########/xml-api/removezonerecord?api.version=1&zone=example.com&line=4




whmapi1 removezonerecord zone=example.com line=4 



{
  "metadata": {
    "version": 1,
    "reason": "Bind reloading on hostname using rndc zone: [example.com]\n",
    "result": 1,
    "command": "removezonerecord"
  }
}




<result>
    <metadata>
        <version>1</version>
        <reason>
            Bind reloading on hostname using rndc zone: [example.com]
        </reason>
        <result>1</result>
        <command>removezonerecord</command>
    </metadata>
</result>



Parameters

ParameterTypeDescriptionPossible valuesExample

zone

string

Required

The zone record's domain.

A valid domain name on the server.example.com
lineinteger

Required

The DNS zone record file's line number.

A positive integer that represents a line number in the domain's DNS zone file.4
serialnumstringThe zone file's serial number.A valid serial number. 2013122501

Returns

This function only returns metadata.