Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function deletes a DNS zone.

Warning
titleImportant:
  • The WHM API 1 adddns function adds an XDNS entry for a domain in the following locations:
    • The /var/cpanel/users/USER file, where USER represents the domain's owner.
    • The /etc/vdomainaliases/DOMAIN directory, where DOMAIN represents the new zone's domain.
    • The /etc/vfilters/DOMAIN directory, where DOMAIN represents the new zone's domain.
  • This function does not automatically delete these entries. You must manually delete these entries, or you cannot use this domain as a value in other API functions.
  • You cannot delete other DNS zones that reside on Write-only servers in a DNS cluster.
Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/killdns?api.version=1&domain=example.com
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/killdns?api.version=1&domain=example.com
Expand
titleCommand Line
Code Block
languagebash
whmapi1 killdns domain=example.com 

Include Page
_WHMAPI1CLINote
_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
  "metadata": {
    "version": 1,
    "reason": "Zones Removed",
    "output": {
      "raw": "example.com => deleted from example. \n"
    },
    "result": 1,
    "command": "killdns"
  }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <metadata>
        <version>1</version>
        <reason>Zones Removed</reason>
        <output>
            <raw>example.com =&gt; deleted from example.</raw>
        </output>
        <result>1</result>
        <command>killdns</command>
    </metadata>
</result>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

Parameters

ParameterTypeDescriptionPossible valuesExample

domain

string

Required

The zone record's domain.

A valid domain name on the server.example.com

Returns

This function only returns metadata.