Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function deletes a DNS zone.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/killdns?domain=example.com
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/killdns?domain=example.com
 Command Line
whmapi0 killdns domain=example.com

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "result":[
      {
         "status":1,
         "statusmsg":"Zones Removed",
         "rawout":"example.com => deleted from server. \n"
      }
   ]
}
 Output (XML)
<killdns>
   <result>     
      <rawout>
               example.com -> deleted from host1.
               example.com -> deleted from host2.        
      </rawout>
      <status>1</status>  
      <statusmsg>Zones Removed</statusmsg>
   </result>
</killdns>

   

Parameters

ParameterTypeDescriptionPossible valuesExample

domain

string

Required

The zone record's domain.

A valid domain name on the server.example.com

 

Returns

ReturnTypeDescriptionPossible valuesExample
resulthashA hash of function information.This hash contains the result hash and the status and statusmsg returns. 

status

Boolean

Whether the function succeeded.

The function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the result hash.

  • A message of success.
  • An error message.
Zones Removed
              

rawout

string

One or more output messages from the function.

The function returns this value in the result hash.

One or more message strings.example.com -> deleted from host1.