Switching Name Server Mode
To switch a name server between master and slave mode, use the switch operation. You can switch multiple name servers in a single packet. To retrieve the zone type, refer to the Retrieving Parameters of SOA Record and Zone section.
Request Packet Structure
A request XML packet changing name server mode includes the switch operation node:
The graphical representation of the switch node is as follows:
- The filter node is required. It specifies the filtering rule. For more information, refer to the Available Filters section. Data type: simpleFilterType (
- The zone_type node is required. Specifies the zone parameters. Data type: string. Allowed values: master | slave.
You can change mode of multiple name servers in a single packet. Add as many switch operations as the number of different filtering rules, you use to change the mode of name servers you need.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The switch node of the output XML packet is structured as follows:
- The result node is required. It wraps the response from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the get operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. It is used to return the error code when the switch operation fails. Data type: unsignedInt
- The errtext node is optional. It is used to return the error message if the switch operation fails. Data type: string.
- The site-id node is optional. It is required if the site ID was set as a filtering rule in the request packet. Data type: integer.
- The site-alias-id node is optional. It is required if the site alias ID was set as a filtering rule in the request packet. Data type: integer.
Changing status of a single name server
This request packet makes the DNS server act as a secondary for the zone specified by site ID 1.
Changing status of multiple name servers
This packet makes the DNS server act as a secondary for the zones specified by sites ID 1 and ID 2.
Response (when the site with ID 2 was not found):