Child pages
  • WHM API 1 Functions - resetzone
Skip to end of metadata
Go to start of metadata

 

Description

This function resets a DNS zone to its default values. This also resets the domain's subdomain DNS records, and restores zone file subdomains in the server's httpd.conf file.

For example, use this function to restore DNS zones that are corrupt.

Note:

Zone resets preserve valid TXT records, but all other records will return to their default values. 

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/resetzone?api.version=1&domain=example.com
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/resetzone?api.version=1&domain=example.com
 Command Line
whmapi1 resetzone domain=example.com 


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "resetzone"
  }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>resetzone</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters  

Note:

You must include either the domain or the zone parameters. 

ParameterTypeDescriptionPossible valuesExample

domain

string

The domain.

A valid domain on the server.example.com
zonestring

The zone file.

A valid zone file name.zonefile
userstringThe domain's owner.A valid username on the server.user

Returns

This function only returns metadata.