WAPI – command domain-update-ns

  Domains, WAPI (API interface)

To change DNS servers for the domain, WAPI interface offers command domain-update-ns.

Parameters

  • name – domain name – required
  • nsset – NSSET for cz domain – required (DNS or nsset)
  • dns – DNS settings – required (DNS or nsset)
    1. empty – use default settings (set the DNS servers WEDOS). Attention, DNS element is required it is only empty!
    2. list of NS servers – can not be used fo .CZ domains (Each entry must contain a field name, then optionally addr_ip4 and addr_ip6, individual servers are embedded in element server)

You must specify either nsset or dns.

Return Values

  • 1000 – DNS servers set successfully 
  • 2209 – invalid NSSET format (for CZ domains)
  • 2210 – invalid format of DNS servers setting 

Return data

The command does not return any data except the return code.

Example 1: set the default DNS (WEDOS)

XML request:

<request>
 <user>tester</user>
 <auth>e18739291ee62396f1a6e9975577db5bbf2ad29e</auth>
 <command>domain-update-ns</command>
 <clTRID>sGECbNbVjv8c</clTRID>
 <data>
  <name>example.cz</name>
  <dns></dns>
 </data>
</request>

XML response:

<response>
 <code>1000</code>
 <result>OK</result>
 <timestamp>1286893068</timestamp>
 <clTRID>sGECbNbVjv8c</clTRID>
 <svTRID>1286893068.1274.1636</svTRID>
 <command>domain-update-ns</command>
</response>

Example 2: setting NSSET

XML request:

<request>
 <user>tester</user>
 <auth>e18739291ee62396f1a6e9975577db5bbf2ad29e</auth>
 <command>domain-update-ns</command>
 <clTRID>sGECbNbVjv8c</clTRID>
 <data>
  <name>example.cz</name>
  <nsset>WEDOS</nsset>
 </data>
</request>

XML response:

<response>
 <code>1000</code>
 <result>OK</result>
 <timestamp>1286893068</timestamp>
 <clTRID>sGECbNbVjv8c</clTRID>
 <svTRID>1286893068.1274.1636</svTRID>
 <command>domain-update-ns</command>
</response>

Example 3: entry of DNS servers

XML request:

<request>
 <user>tester</user>
 <auth>e18739291ee62396f1a6e9975577db5bbf2ad29e</auth>
 <command>domain-update-ns</command>
 <clTRID>sGECbNbVjv8c</clTRID>
 <data>
  <name>example.cz</name>
  <dns>
   <server>
    <name>ns.wedos.net</name>
   </server> 
   <server> 
    <name>ns.wedos.cz</name> 
   </server> 
  </dns> 
 </data>
</request>

XML response:

<response>
 <code>1000</code>
 <result>OK</result>
 <timestamp>1286893068</timestamp>
 <clTRID>sGECbNbVjv8c</clTRID>
 <svTRID>1286893068.1274.1636</svTRID>
 <command>domain-update-ns</command>
</response>