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.

Authorizations:

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  listzones

Response samples

Content type
application/json
{
  • "data": {
    • "zone": [
      • {
        • "domain": "example.com",
        • "zonefile": "example.net.db"
        }
      ]
    },
  • "metadata": {
    • "command": "listzones",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}