Setting Recursion Type
The type of recursion can be changed by the set-recursion operation. Before setting the recursion type, make sure it is supported by the server.
Request Packet Structure
A request XML packet changing the recursion type includes the set-recursion operation node:
<packet>
<dns>
<set-recursion>
...
</set-recursion>
</dns>
</packet>
The set-recursion node is presented by type
DNSSetRecursionInputType (dns_input.xsd
) and structured as
follows:
Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.9.1/agent_input.svg.
- The value node is required. Specifies the type of recursion.
Data type: DNSRecursionValueType (
plesk_dns.xsd
) . Allowed values: on | off | local | localnets.
Response Packet Structure
The set-recursion node is presented by type
DNSSetRecursionOutputType (dns_output.xsd
) and is structured as
follows:
Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.9.1/agent_output.svg.
- The result node is required. It wraps the information got from
the server. Data type: resultType (
common.xsd
). - The status node is required. It specifies the execution status of the set-recursion operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return the error code when the set-recursion operation fails. Data type: unsignedInt.
- The errtext node is optional. It is used to return the error message if the set-recursion operation fails. Data type: string.
Samples
Allowing all recursive requests to the local DNS server
This packet allows all recursive requests to the local DNS server.
<packet>
<dns>
<set-recursion>
<value>on</value>
</set-recursion>
</dns>
</packet>
Response:
<code><packet></code>
<dns></code>
<set-recursion></code>
<result></code>
<status>ok</status></code>
</result></code>
</set-recursion></code>
</dns></code>
</packet></code>
Allowing recursive requests from the local net to the local DNS server
This packet allows recursive requests coming from the local net to the local DNS server.
<packet>
<dns>
<set-recursion>
<value>localnets</value>
</set-recursion>
</dns>
</packet>