Use the get operation to perform the following:
Local DNS server can be enabled or disabled for the specified zone. When it is enabled, it can act as a "primary" or "slave" name server. If you want to change the type of zone, please refer to the Switching Name Server Mode section.
A request XML packet retrieving a SOA record includes the get operation node:
<packet>
<dns>
<get>
...
</get>
</dns>
</packet>
The graphical representation of the get node is as follows:
dns_input.xsd
).
The following table shows the response parameters, if either filter or soa node is omitted.
|
SOA present |
SOA omitted |
Filter present |
SOA record, zone type, zone status of a site or alias |
zone type, zone status of a site or site alias |
Filter omitted |
zone status, SOA record of the server template |
|
You can retrieve the parameters of multiple sites or site aliases in a single packet. Add as many get operations as the number of different filtering rules.
<dns>
<get>
...
</get>
...
<get>
...
</get>
</dns>
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The set node of the output XML packet is structured as follows:
common.xsd
). plesk_dns.xsd
).
This request packet retrieves the zone type and zone status of the site with ID 1.
<packet version="1.6.3.0">
<dns>
<get>
<filter>
<site-id>1</site-id>
</filter>
</get>
</dns>
</packet>
Response:
<packet version="1.6.3.0">
<dns>
<get>
<result>
<status>ok</status>
<site-id>1</site-id>
<zone_type>master</zone_type>
<zone_status>enabled</zone_status>
</result>
</get>
</dns>
</packet>
This request packet retrieves the SOA record, zone type, and zone status of the site with ID 1.
<packet version="1.6.3.0">
<dns>
<get>
<filter>
<site-id>1</site-id>
</filter>
<soa/>
</get>
</dns>
</packet>
Response:
<packet version="1.6.3.0">
<dns>
<get>
<result>
<status>ok</status>
<site-id>1</site-id>
<soa>
<ttl>86400</ttl>
<refresh>10800</refresh>
<retry>3600</retry>
<expire>604800</expire>
<minimum>10800</minimum>
</soa>
<zone_type>master</zone_type>
<zone_status>enabled</zone_status>
</result>
</get>
</dns>
</packet>
This request packet retrieves a zone type, and zone status of the site with ID 2 and domain alias with ID 1.
<packet version="1.6.3.0">
<dns>
<get>
<filter>
<site-alias-id>1</site-alias-id>
</filter>
</get>
<get>
<filter>
<site-id>2</site-id>
</filter>
</get>
</dns>
</packet>
Request:
<packet version="1.6.3.0">
<dns>
<get>
<result>
<status>ok</status>
<site-alias-id>1</site-alias-id>
<zone_type>master</zone_type>
<zone_status>enabled</zone_status>
</result>
</get>
<get>
<result>
<status>ok</status>
<site-id>2</site-id>
<zone_type>master</zone_type>
<zone_status>enabled</zone_status>
</result>
</get>
</dns>
</packet>