1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Central DNS API Request

Discussion in 'Plesk Expand 2.3 General Discussion' started by Stephen Hoogendijk, Apr 7, 2009.

  1. Stephen Hoogendijk

    Stephen Hoogendijk Guest

    0
     
    Hi,

    Im trying to fetch the type of a centralized DNS server. (if its a Master or Slave DNS server)

    Im using this xml scheme, but its producing errors:

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Get plesk servers list -->
    <packet version=\"2.3.2.17\">
    <get_mode>
    <filter><id>7</id></filter>
    </get_mode>
    </packet>

    what is the correct packet?
     
  2. gold

    gold Regular Pleskian

    25
    57%
    Joined:
    Jan 8, 2008
    Messages:
    307
    Likes Received:
    0
    You need to correct the '/usr/local/expand/share/expand/protocol/plesk/centralized_dns_input.xsd' file
    Code:
    <xs:element name="get_mode">
    	<xs:annotation>
    		<xs:documentation>Gets DNS server mode</xs:documentation>
    	</xs:annotation>
    	<xs:complexType>
    -		<xs:complexContent>
    -			<xs:extension base="assignType">
    -				<xs:sequence>
    -					<xs:element name="filter" type="pleskRepositoryFilterType"/>
    -				</xs:sequence>
    -			</xs:extension>
    -		</xs:complexContent>
    +		<xs:sequence>
    +			<xs:element name="filter" type="pleskRepositoryFilterType"/>
    +		</xs:sequence>
    	</xs:complexType>
    </xs:element>
    
    then restart Expand by command
    Code:
    /etc/init.d/expand restart
    
    Then you can use with '/usr/local/expand/sbin/exp_plesk_centralized_dns' command the following packets:
    Code:
    <?xml version="1.0"?>
    <packet version="2.3.2.17">
    	<get_mode>
    		<filter>
    			<all/>
    		</filter>
    	</get_mode>
    </packet>
    
    <?xml version="1.0"?>
    <packet version="2.3.2.17">
    	<get_mode>
    		<filter>
    			<id>1</id> <!-- DNS server ID -->
    		</filter>
    	</get_mode>
    </packet>
    
    <?xml version="1.0"?>
    <packet version="2.3.2.17">
    	<get_mode>
    		<filter>
    			<server_id>55</server_id> <!-- Plesk server ID -->
    		</filter>
    	</get_mode>
    </packet>
    
    <?xml version="1.0"?>
    <packet version="2.3.2.17">
    	<get_mode>
    		<filter>
    			<dns_plesk_server>
    				<id>1</id>
    				<server_id>55</server_id>
    			</dns_plesk_server>
    		</filter>
    	</get_mode>
    </packet>
    
     
Loading...