Get DNS Information

Versi Bahasa Indonesia

Description

Get DNS Information

Query

dns/info

List Variable

Name Data Type Required/Optional Description
domain varchar(255) Required Domain name

Example

$post["username"] = 'apiusername';
$post["password"] = hash('sha256','apipassword');
$post["domain"] = 'domain.co.id'
$url = 'http://[reseller url]/api/dns/info';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
curl_close($ch);

Example Response

Succeed:

<?xml version="1.0" encoding="UTF-8"?>
<epp>
  <result>
    <resultCode>1000</resultCode>
    <resultMsg>Command Complete Successfully</resultMsg>
  </result>
  <resultData>
    <dns0>
      <dnsid>6</dnsid>
      <line>4</line>
      <domainid>107</domainid>
      <domain>domain.co.id</domain>
      <class>IN</class>
      <type>SOA</type>
      <record>domain.co.id.</record>
      <destination/>
      <ttl>86400</ttl>
      <priority>0</priority>
      <weight>0</weight>
      <port>0</port>
      <mname>ns1.mysrsx.com</mname>
      <rname>email.rumahweb.co.id</rname>
      <refresh>86400</refresh>
      <retry>7200</retry>
      <serial>2013050100</serial>
      <expire>3600000</expire>
      <minimum>86400</minimum>
      <preference>0</preference>
    </dns0>
    <dns1>
      <dnsid>12</dnsid>
      <line>15</line>
      <domainid>107</domainid>
      <domain>domain.co.id</domain>
      <class>IN</class>
      <type>A</type>
      <record>domain.co.id.</record>
      <destination>127.0.0.1</destination>
      <ttl>14400</ttl>
      <priority/>
      <weight/>
      <port/>
      <mname/>
      <rname/>
      <refresh>0</refresh>
      <retry>0</retry>
      <serial>0</serial>
      <expire>0</expire>
      <minimum>0</minimum>
      <preference>0</preference>
    </dns1>
    <dns2>
      <dnsid>13</dnsid>
      <line>16</line>
      <domainid>107</domainid>
      <domain>domain.co.id</domain>
      <class>IN</class>
      <type>A</type>
      <record>sub.domain.co.id.</record>
      <destination>5.5.5.5</destination>
      <ttl>14400</ttl>
      <priority>0</priority>
      <weight>0</weight>
      <port>0</port>
      <mname/>
      <rname/>
      <refresh>0</refresh>
      <retry>0</retry>
      <serial>0</serial>
      <expire>0</expire>
      <minimum>0</minimum>
      <preference>0</preference>
    </dns2>
    <domain_ns1>ns1.mysrsx.com</domain_ns1>
    <domain_ns2>ns2.mysrsx.com</domain_ns2>
    <domain_ns3>ns1.mysrsx.net</domain_ns3>
    <domain_ns4>ns2.mysrsx.net</domain_ns4>
    <reseller_ns1>ns1.mysrsx.com</reseller_ns1>
    <reseller_ns2>ns2.mysrsx.com</reseller_ns2>
    <reseller_ns3>ns1.mysrsx.net</reseller_ns3>
    <reseller_ns4>ns2.mysrsx.net</reseller_ns4>
  </resultData>
</epp>

DNS not yet initialized:


<?xml version="1.0" encoding="UTF-8"?>
<epp>
  <result>
    <resultCode>1000</resultCode>
    <resultMsg>Command Complete Successfully</resultMsg>
  </result>
  <resultData>
    <domain_ns1>ns1.rumahweb.com</domain_ns1>
    <domain_ns2>ns2.rumahweb.com</domain_ns2>
    <domain_ns3/>
    <domain_ns4/>
    <reseller_ns1>ns1.mysrsx.com</reseller_ns1>
    <reseller_ns2>ns2.mysrsx.com</reseller_ns2>
    <reseller_ns3>ns1.mysrsx.net</reseller_ns3>
    <reseller_ns4>ns2.mysrsx.net</reseller_ns4>
  </resultData>
</epp>

Failed

<?xml version="1.0" encoding="UTF-8"?>
<epp>
  <result>
    <resultCode>1001</resultCode>
    <resultMsg>Command Failed</resultMsg>
  </result>
</epp>