Return server's DNS zones

This function lists the server's DNS zones.

Important:

When you disable the DNS role, the system disables this function.

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/listzones
Request samples
whmapi1 --output=jsonpretty \
  listzones
Response samples
application/json
{
  • "data": {
    • "zone": [
      • {
        • "domain": "example.com",
        • "zonefile": "example.net.db"
        }
      ]
    },
  • "metadata": {
    • "command": "listzones",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}