Chapter 5. DnsZone

Table of Contents

Create
Status
List
Update
Delete

Nameserver Zone management API

Generic reference:

/dns/domain/ZONE/USER_ID/

Where:

USER_ID: your specific id assigned by BDOM system
ZONE: your domain name

Create

Reference: /bdom/dns/domain/-/USER_ID/

Operation Type: PUT

Where ZONE: Specify new zone name

Where USER_ID: Your specific id assigned by BDOM system

Validation XSD:

Example 5.1. DnsZone Validation XSD:

Validator

Source:

      
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
    <xs:element name="zone">
        <xs:complexType>
            <xs:all>
		<xs:element name="domain_id" type="xs:integer" minOccurs="0" />
		<xs:element name="user_id" type="xs:integer" minOccurs="0" />
                <xs:element name="name" type="xs:string" />
                <xs:element name="soa">
		    <xs:complexType>
			<xs:all>
				xs:element name="record_id" type="xs:integer" minOccurs="0" />
				<xs:element name="mname" type="xs:string" />
				<xs:element name="rname" type="xs:string" />
				<xs:element name="serial" type="xs:integer" />
				<xs:element name="ttl" type="xs:integer" />
			</xs:all>
		     </xs:complexType>
		</xs:element>
		<xs:element name="record_list">
		     <xs:complexType>
		      <xs:sequence maxOccurs="unbounded">
			<xs:element name="record_item">
			  <xs:complexType>
		            <xs:all>
				<xs:element name="record_id" type="xs:integer" minOccurs="0" />
				<xs:element name="domain_id" type="xs:integer" minOccurs="0" />
				<xs:element name="name" type="xs:string" />
				<xs:element name="type" type="xs:string" />
				<xs:element name="class" type="xs:string" minOccurs="0" />
				<xs:element name="ttl" type="xs:integer" />
				<xs:element name="priority" type="xs:integer" minOccurs="0" />
				<xs:element name="content" type="xs:string" />
			     </xs:all>
			   </xs:complexType>
			 </xs:element>
			</xs:sequence>
		    </xs:complexType>
		</xs:element>
	  </xs:all>
	</xs:complexType>
    </xs:element>
</xs:schema>
      
      
[Important]Important

domain_id and record_id fields are not used on CREATE operation and are available for UPDATEoperation

[Important]Important
Required Fields: name, soa(mname,rname,serial,ttl), record_list, record_item(name, type, ttl, content)
Optional Fields: domain_id, user_id, soa(record_id), record_item(record_id, domain_id, class, priority)


Example 5.2. DnsZone Create:valid

REQUEST:

Generic Operation: PUT(http://backend.antagus.de/bdom/dns/domain/-/13048/,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<zone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNameSpaceSchemaLocation="DnsZone.xsd">
  <name>example-nic-domain.de</name>
  <user_id>13048</user_id>
  <record_list>
    <record_item>
      <content>ns1.ns-serve.net</content>
      <name>example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>
    <record_item>
      <content>ns2.ns-serve.net</content>
      <name>example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>www.example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>mail.example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>*.example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>mail.example-nic-domain.de</content>
      <name>example-nic-domain.de</name>
      <priority>10</priority>
      <ttl>86400</ttl>
      <type>MX</type>
    </record_item>
  </record_list>
  <soa>
    <mname>ns1.ns-serve.net</mname>
    <rname>root@ns1.ns-serve.net</rname>
    <serial>1131544004</serial>
    <ttl>86400</ttl>
  </soa>
</zone>
        
        

RESPONSE:

        
<response >
  <domain_id>783664</domain_id>*
</response>
        
        
[Important]Important

domain_id to be used for FUTURE DnsZone operations


Example 5.3. DnsZone Create:wrong uri in request

REQUEST:

Generic Operation: PUT(http://backend.antagus.de/bdom/dns/example-nic-domain.de/-/13048/,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<zone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNameSpaceSchemaLocation="DnsZone.xsd">
  <name>nic-test.de</name>
  <user_id>13048</user_id>
  <record_list>
    <record_item>
      <content>ns1.ns-serve.net</content>
      <name>example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>
    <record_item>
      <content>ns2.ns-serve.net</content>
      <name>example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>www.example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>mail.example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <name>*.example-nic-domain.de</name>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>mail.example-nic-domain.de</content>
      <name>example-nic-domain.de</name>
      <priority>10</priority>
      <ttl>86400</ttl>
      <type>MX</type>
    </record_item>
  </record_list>
  <soa>
    <mname>ns1.ns-serve.net</mname>
    <rname>root@ns1.ns-serve.net</rname>
    <serial>1131544004</serial>
    <ttl>86400</ttl>
  </soa>
</zone>

        
        

RESPONSE:

        
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">                                                                          
<html><head>                                                                                                              
<title>405 Method Not Allowed</title>                                                                                       
</head><body>                                                                                                               
<h1>Method Not Allowed</h1>                                                                                                 
<p>The requested method PUT is not allowed for the URL /bdom/dns/example-nic-domain.de/-/13048/.</p>                        
<hr>                                                                                                                        
<address>Apache/2.0.63 (FreeBSD) DAV/2 SVN/1.4.6 mod_perl/2.0.3 Perl/v5.8.8 Server at backend.antagus.de Port 80</address>
</body></html>
        
        

Status

Description: DnsZone status information based on domain name and user id

Reference: /bdom/dns/domain/ZONE/USER_ID/

Operation Type: GET

Where:

USER_ID: your specific id assigned by BDOM system
ZONE: your domain name

Example 5.4. DnsZone Status: Valid request

REQUEST:

Generic Operation: GET(http://backend.antagus.de/bdom/dns/domain/783664/13048/

RESPONSE:

        
<response >                                                            
  <domain_id>783664</domain_id>                                        
  <name>example-nic-domain.de</name>                                             
  <record_list>                                                        
    <record_item>                                                      
      <content>ns1.ns-serve.net</content>                              
      <domain_id>783664</domain_id>                                    
      <name>example-nic-domain.de</name>                               
      <record_id>6561581</record_id>                                   
      <ttl>86400</ttl>                                                 
      <type>NS</type>                                                  
    </record_item>                                                     
    <record_item>                                                      
      <content>ns2.ns-serve.net</content>                              
      <domain_id>783664</domain_id>                                    
      <name>example-nic-domain.de</name>                               
      <record_id>6561582</record_id>                                   
      <ttl>86400</ttl>                                                 
      <type>NS</type>                                                  
    </record_item>                                                     
    <record_item>                                                      
      <content>193.231.240.25</content>                                
      <domain_id>783664</domain_id>                                    
      <name>example-nic-domain.de</name>                               
      <record_id>6561583</record_id>                                   
      <ttl>86400</ttl>                                                 
      <type>A</type>                                                   
    </record_item>                                                     
    <record_item>                                                      
      <content>193.231.240.25</content>                                
      <domain_id>783664</domain_id>                                    
      <name>www.example-nic-domain.de</name>                           
      <record_id>6561584</record_id>                                   
      <ttl>86400</ttl>                                                 
      <type>A</type>                                                   
    </record_item>                                                     
    <record_item>                                                      
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>mail.example-nic-domain.de</name>
      <record_id>6561585</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>*.example-nic-domain.de</name>
      <record_id>6561586</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    <record_item>
      <content>mail.example-nic-domain.de</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <priority>10</priority>
      <record_id>6561587</record_id>
      <ttl>86400</ttl>
      <type>MX</type>
    </record_item>
  </record_list>
  <soa>
    <mname>ns1.ns-serve.net</mname>
    <record_id>6561588</record_id>
    <rname>root@ns1.ns-serve.net</rname>
    <serial>1131544004</serial>
    <ttl>86400</ttl>
  </soa>
  <user_id>13048</user_id>
</response>
        
        

Example 5.5. DnsZone Status: Invalid request - wrong uri in request

REQUEST:

Generic Operation: GET(http://backend.antagus.de/bdom/dns/domain/example-nic-domain.de/13048/

RESPONSE:

        
<response >                                                  
  <error>                                                    
    <code>DNS_NOTFOUND</code>                                
    <msg>DNS Object not found  Domain Zone  example-nic-domain.de</msg>
  </error>                                                             
</response>


List

Description: Lists all domains with DNS info

Reference: /bdom/dns/list/domain/USER_ID/

Operation Type: GET

Where:

USER_ID: your specific id assigned by BDOM system

Example 5.4. DnsZone list: Valid request

REQUEST:

Generic Operation: GET(http://backend.antagus.de/bdom/dns/list/domain/13048/

RESPONSE:

        
<response>
<zone_item>
<domain_id>23</domain_id>
<name>test1.info</name>
</zone_item>
<zone_item>
<domain_id>89</domain_id>
<name>ghdgjsgfhsj.test</name>
</zone_item>
</response>
        
        

Example 5.5. DnsZone Status: Invalid request - wrong uri in request

REQUEST:

Generic Operation: GET(http://backend.antagus.de/bdom/dns/list/domain/199999/

RESPONSE:

        
<response>
<error>
<code>DNS_NOTFOUND</code>
<msg>DNS Object not found [domain/199999(199999)]</msg>
<umsg>DNS Object not found [domain/199999(199999)]</umsg>
</error>
</response>


Update

Reference: /bdom/dns/domain/ZONE/USER_ID/

Operation Type: POST

Where ZONE: Specify zone name to be updated

Where USER_ID: Your specific id assigned by BDOM system

Validation XSD:DnsZone XSD

[Note]Note

For UPDATE operation is recomended to obtain data with a STATUS operation and modify fields to update

Example 5.6. DnsZone Update:valid - remove www.example-nic-domain.de

REQUEST

Generic Operation: POST(http://backend.antagus.de/bdom/dns/domain/example-nic-domain.de/13048/,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<zone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNameSpaceSchemaLocation="DnsZone.xsd">

  <domain_id>783664</domain_id>
  <name>example-nic-domain.de</name>

  <record_list>

    <record_item>
      <content>ns1.ns-serve.net</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <record_id>6561581</record_id>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>

    <record_item>
      <content>ns2.ns-serve.net</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <record_id>6561582</record_id>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>

    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <record_id>6561583</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>


    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>mail.example-nic-domain.de</name>
      <record_id>6561585</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>

    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>*.example-nic-domain.de</name>
      <record_id>6561586</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    
    <record_item>
      <content>mail.example-nic-domain.de</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <priority>10</priority>
      <record_id>6561587</record_id>
      <ttl>86400</ttl>
      <type>MX</type>
    </record_item>
  </record_list>
  
  <soa>
    <mname>ns1.ns-serve.net</mname>
    <record_id>6561588</record_id>
    <rname>root@ns1.ns-serve.net</rname>
    <serial>1131544004</serial>
    <ttl>86400</ttl>
  </soa>
  <user_id>13048</user_id>
</zone>
       
        

RESPONSE:

        
<response >
  <domain_id>783664</domain_id>
</response>
        
        

Example 5.7. DnsZone Update:invalid - missing schema reference from xml request

REQUEST:

Generic Operation: POST(http://backend.antagus.de/bdom/dns/domain/example-nic-domain.de/942/,xml)

Where xml:

        
<?xml version="1.0" encoding="UTF-8"?>
<zone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <domain_id>783664</domain_id>
  <name>example-nic-domain.de</name>

  <record_list>

    <record_item>
      <content>ns1.ns-serve.net</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <record_id>6561581</record_id>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>

    <record_item>
      <content>ns2.ns-serve.net</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <record_id>6561582</record_id>
      <ttl>86400</ttl>
      <type>NS</type>
    </record_item>

    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <record_id>6561583</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>


    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>mail.example-nic-domain.de</name>
      <record_id>6561585</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>

    <record_item>
      <content>193.231.240.25</content>
      <domain_id>783664</domain_id>
      <name>*.example-nic-domain.de</name>
      <record_id>6561586</record_id>
      <ttl>86400</ttl>
      <type>A</type>
    </record_item>
    
    <record_item>
      <content>mail.example-nic-domain.de</content>
      <domain_id>783664</domain_id>
      <name>example-nic-domain.de</name>
      <priority>10</priority>
      <record_id>6561587</record_id>
      <ttl>86400</ttl>
      <type>MX</type>
    </record_item>
  </record_list>
  
  <soa>
    <mname>ns1.ns-serve.net</mname>
    <record_id>6561588</record_id>
    <rname>root@ns1.ns-serve.net</rname>
    <serial>1131544004</serial>
    <ttl>86400</ttl>
  </soa>
  <user_id>13048</user_id>
</zone>
       
        

RESPONSE:

        
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 webmaster@backend.antagus.de and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.0.63 (FreeBSD) DAV/2 SVN/1.4.6 mod_perl/2.0.3 Perl/v5.8.8 Server at backend.antagus.de Port 80</address>
</body></html>
        
        

Delete

Reference: /bdom/dns/domain/ZONE/USER_ID/

Operation Type: DELETE

USER_ID: your specific id assigned by BDOM system
ZONE: zone name to be deleted

Example 5.8. DnsZone Delete:

REQUEST:

Generic Operation: DELETE(http://backend.antagus.de/bdom/dns/domain/example-nic-domain/13048/)

RESPONSE:

        
<response >
  <status>OK</status>
</response>