Use the set operation to update a SOA record for the DNS zone template, or for the site (site alias) specified by ID. The parameters in the SOA record of the zone template will be applied to a new site or site alias on creation. You can update multiple SOA records in a single packet. For more information about SOA records, refer to the SOA parameters section.
A request XML packet updating a SOA record includes the set operation node:
<packet>
<dns>
<set>
...
</set>
</dns>
</packet>
The graphical representation of the set node is as follows:
dns_input.xsd
).plesk_dns.xsd
).Note: If you omit the filter node, the operation will update SOA parameters for the DNS zone template.
You can update multiple SOA records in a single packet. Add as many set operations as the number of different filtering rules.
<dns>
<set>
...
</set>
...
<set>
...
</set>
</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
).
This request packet updates a SOA record of the site with ID 12.
<packet>
<dns>
<set>
<filter>
<site-id>12</site-id>
</filter>
<soa>
<ttl>86400</ttl>
<refresh>10800</refresh>
<retry>3600</retry>
<expire>604800</expire>
<minimum>10800</minimum>
</soa>
</set>
</dns>
</packet>
Response:
<packet>
<dns>
<set>
<result>
<status>ok</status>
<site-id>12</site-id>
</result>
</set>
</dns>
</packet>
This request packet updates SOA records of the sites with ID 12 and ID 13.
<packet>
<dns>
<set>
<filter>
<site-id>12</site-id>
<site-id>13</site-id>
</filter>
<soa>
<ttl>86400</ttl>
<refresh>10800</refresh>
<retry>3600</retry>
<expire>604800</expire>
<minimum>10800</minimum>
</soa>
</set>
</dns>
</packet>
Response (when the site with ID 13 was not found on the server, and the site with ID 12 was updated):
<packet>
<dns>
<set>
<result>
<status>ok</status>
<site-id>12</site-id>
</result>
<result>
<status>error</status>
<errcode>1015</errcode>
<errtext>Site alias does not exist.</errtext>
<site-id>13</site-id>
</result>
</set>
</dns>
</packet>