dumpzone function from within your custom script:
/xml-api/dumpzone function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/dumpzone
dumpzone function from within your custom script:
/json-api/dumpzone function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/dumpzone
dumpzone function takes the following required variable as input: example.com
dumpzone function. 1 — success.
0 — failure.
example.com
127.0.0.1
IN, for "Internet."
0 is the highest priority.
ns1.example.com
ns1.example.com
user.example.com user.example.com rather than user@example.com
NS, SOA, A, etc.
https://example.com:2087/xml-api/dumpzone?domain=example.com in WebHost Manager will produce output similar to:
<dumpzone>
<result>
<status>1</status>
<statusmsg>Zone Serialized</statusmsg>
<record>
<name/>
<Line>1</Line>
<raw>; cPanel first:11.17.0-BETA_19364 latest:11.23.1-UNKNOWN_24255
Cpanel::ZoneFile::VERSION:1.2 mtime:1212701156</raw>
<ttl>86400</ttl>
<type>:RAW</type>
</record>
<record>
<name/>
<Line>2</Line>
<raw>; Zone file for example.com</raw>
<ttl>86400</ttl>
<type>:RAW</type>
</record>
<record>
<name/>
<Line>3</Line>
<ttl>14400</ttl>
<type>$TTL</type>
</record>
<record>
<name>example.com.</name>
<Line>4</Line>
<Lines>7</Lines>
<class>IN</class>
<expire>3600000</expire>
<minimum>86400</minimum>
<mname>ns1.build.cpanel.net</mname>
<refresh>86400</refresh>
<retry>7200</retry>
<rname>webmaster.example.com</rname>
<serial>2008060510</serial>
<ttl>86400</ttl>
<type>SOA</type>
</record>
<record>
<name>example.com.</name>
<Line>11</Line>
<class>IN</class>
<nsdname>ns1.example.com</nsdname>
<ttl>86400</ttl>
<type>NS</type>
</record>
<record>
<name>domain.com.</name>
<Line>12</Line>
<class>IN</class>
<nsdname>ns2.domain.com</nsdname>
<ttl>86400</ttl>
<type>NS</type>
</record>
<record>
<name>example.com.</name>
<Line>13</Line>
<address>10.215.215.13</address>
<class>IN</class>
<ttl>14400</ttl>
<type>A</type>
</record>
<record>
<name>localhost.example.com.</name>
<Line>14</Line>
<address>127.0.0.1</address>
<class>IN</class>
<ttl>14400</ttl>
<type>A</type>
</record>
<record>
<name>example.com.</name>
<Line>15</Line>
<class>IN</class>
<exchange>domain.com</exchange>
<preference>0</preference>
<ttl>14400</ttl>
<type>MX</type>
</record>
<record>
<name>mail.example.com.</name>
<Line>16</Line>
<class>IN</class>
<cname>domain.com</cname>
<ttl>14400</ttl>
<type>CNAME</type>
</record>
<record>
<name>www.example.com.</name>
<Line>17</Line>
<class>IN</class>
<cname>example.com</cname>
<ttl>14400</ttl>
<type>CNAME</type>
</record>
<record>
<name>ftp.example.com.</name>
<Line>18</Line>
<class>IN</class>
<cname>example.com</cname>
<ttl>14400</ttl>
<type>CNAME</type>
</record>
</result>
</dumpzone>
https://example.com:2087/json-api/dumpzone?domain=example.com in WebHost Manager will produce output similar to:
{
"result":[
{
"status":1,
"record":[
{
"Line":1,
"raw":"; cPanel first:11.24.7-EDGE_34021 latest:11.24.7-BETA_34513
Cpanel::ZoneFile::VERSION:1.3 mtime:1239822374 hostname:server.example.com",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":2,
"raw":"; Zone file for example.com",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":3,
"ttl":"14400",
"type":"$TTL",
"name":""
},
{
"serial":"2009041504",
"minimum":"86400",
"rname":"admin.example.net",
"refresh":"86400",
"Lines":7,
"name":"example.com.",
"Line":4,
"retry":"7200",
"ttl":"86400",
"class":"IN",
"mname":"ns1.example.com",
"type":"SOA",
"expire":"3600000"
},
{
"Line":11,
"raw":"",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":12,
"nsdname":"ns1.example.com",
"ttl":"86400",
"class":"IN",
"type":"NS",
"name":"example.com."
},
{
"Line":13,
"nsdname":"ns2.example.com",
"ttl":"86400",
"class":"IN",
"type":"NS",
"name":"example.com."
},
{
"Line":14,
"nsdname":"ns1.example.com",
"ttl":"86400",
"class":"IN",
"type":"NS",
"name":"example.com."
},
{
"Line":15,
"raw":"",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":16,
"raw":"",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":17,
"ttl":"14400",
"address":"127.0.0.1",
"class":"IN",
"type":"A",
"name":"example.com."
},
{
"Line":18,
"raw":"",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":19,
"ttl":"14400",
"address":"127.0.0.1",
"class":"IN",
"type":"A",
"name":"localhost.example.com."
},
{
"Line":20,
"raw":"",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":21,
"ttl":"14400",
"class":"IN",
"preference":"0",
"exchange":"example.com",
"type":"MX",
"name":"example.com."
},
{
"Line":22,
"raw":"",
"ttl":"86400",
"type":":RAW",
"name":""
},
{
"Line":23,
"cname":"example.com",
"ttl":"14400",
"class":"IN",
"type":"CNAME",
"name":"mail.example.com."
},
{
"Line":24,
"cname":"example.com",
"ttl":"14400",
"class":"IN",
"type":"CNAME",
"name":"www.example.com."
},
{
"Line":25,
"cname":"example.com",
"ttl":"14400",
"class":"IN",
"type":"CNAME",
"name":"ftp.example.com."
},
{
"Line":26,
"ttl":"14400",
"address":"127.0.0.1",
"class":"IN",
"type":"A",
"name":"server1.example.com."
},
{
"Line":27,
"ttl":"14400",
"address":"127.0.0.1",
"class":"IN",
"type":"A",
"name":"ns2.example.com."
},
{
"Line":28,
"ttl":"14400",
"address":"127.0.0.1",
"class":"IN",
"type":"A",
"name":"ns1.example.com."
}
],
"statusmsg":"Zone Serialized"
}
]
}
Copyright © cPanel 2000-2009.