QueryZoneList

From NETIM
(Difference between revisions)
Jump to: navigation, search
m (Text replace - "API Version 1 (Recommended)" to "API Version 1 (Deprecated)")
 
(6 intermediate revisions by one user not shown)
Line 1: Line 1:
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
 +
 +
<tabs>
 +
<tab name="API Version 2 (Recommended)">
 +
 +
{| class="wikitable" style="width: 200px;"
 +
! Release
 +
|-
 +
|API >= 2.0
 +
|}
 +
 +
 +
'''Description'''
 +
 +
Returns all DNS records of a domain name
 +
 +
[[StructQueryZoneList]][] queryZoneList(string idSession, string domain)
 +
 +
 +
'''Perimeter'''
 +
 +
Applies only to domain names
 +
 +
 +
'''Parameters'''
 +
{| class="wikitable" style="width: 700px;"
 +
! Format
 +
! Variable
 +
! Description
 +
! Notes
 +
|-
 +
|style="width: 100px;" | string (32)|| style="width: 150px;" | idSession || style="width: 150px" | Session ID  || style="width: 300px" |
 +
|-
 +
|string (255)|| domain || Domain name ||
 +
|}
 +
 +
 +
'''Return'''
 +
 +
An array of [[StructQueryZoneList]]
 +
 +
 +
'''Notes'''
 +
 +
None
 +
 +
 +
== Examples ==
 +
 +
''' PHP '''
 +
<source lang="php">
 +
<?php
 +
$clientSOAP = new SoapClient("http://URL.wsdl");
 +
 +
try
 +
{
 +
      $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN");
 +
      $ArrayZoneList = $clientSOAP->queryZoneList($idSession, "netim.com");
 +
     
 +
      print_r($ArrayZoneList);
 +
}
 +
catch(SoapFault $fault)
 +
{
 +
      echo "Exception : " .$fault->getMessage(). "\n";
 +
}
 +
 +
if (isset($idSession))
 +
{
 +
      $clientSOAP->sessionClose($idSession);
 +
}
 +
?>
 +
</source >
 +
 +
 +
</tab>
 +
<tab name="API Version 1 (Deprecated)">
 +
 
{| class="wikitable" style="width: 200px;"
 
{| class="wikitable" style="width: 200px;"
 
! Release
 
! Release
Line 52: Line 129:
 
try
 
try
 
{
 
{
       $idSession = $clientSOAP−>login("XXXX", "XXXX", "EN");
+
       $idSession = $clientSOAP->login("XXXX", "XXXX", "EN");
       $ArrayZoneList = $clientSOAP−>queryZoneList($idSession, "netim.com");
+
       $ArrayZoneList = $clientSOAP->queryZoneList($idSession, "netim.com");
 
        
 
        
 
       print_r($ArrayZoneList);
 
       print_r($ArrayZoneList);
Line 59: Line 136:
 
catch(SoapFault $fault)
 
catch(SoapFault $fault)
 
{
 
{
       echo "Exception : " .$fault−>getMessage(). "\n";
+
       echo "Exception : " .$fault->getMessage(). "\n";
 
}
 
}
  
 
if (isset($idSession))
 
if (isset($idSession))
 
{
 
{
       $clientSOAP−>logout($idSession);
+
       $clientSOAP->logout($idSession);
 
}
 
}
 
?>
 
?>
Line 103: Line 180:
 
}  
 
}  
 
</source>
 
</source>
 +
 +
</tab>
 +
</tabs>

Latest revision as of 14:59, 2 August 2017


Release
API >= 2.0


Description

Returns all DNS records of a domain name

StructQueryZoneList[] queryZoneList(string idSession, string domain) 


Perimeter

Applies only to domain names


Parameters

Format Variable Description Notes
string (32) idSession Session ID
string (255) domain Domain name


Return

An array of StructQueryZoneList


Notes

None


[edit] Examples

PHP

<?php
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try
{
      $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN");
      $ArrayZoneList = $clientSOAP->queryZoneList($idSession, "netim.com");
 
      print_r($ArrayZoneList);
}
catch(SoapFault $fault)
{
      echo "Exception : " .$fault->getMessage(). "\n";
}
 
if (isset($idSession))
{
      $clientSOAP->sessionClose($idSession);
}
?>


Release Runtime
API >= 1.0 Synchronous


Description

Returns all DNS records of a domain name

StructQueryZoneList[] queryZoneList(string idSession, string domain) 


Perimeter

Applies only to domain names


Parameters

Format Variable Description Notes
string (32) idSession Session ID
string (255) domain Domain name


Return

An array of StructQueryZoneList


Notes

None


[edit] Examples

PHP

<?php
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try
{
      $idSession = $clientSOAP->login("XXXX", "XXXX", "EN");
      $ArrayZoneList = $clientSOAP->queryZoneList($idSession, "netim.com");
 
      print_r($ArrayZoneList);
}
catch(SoapFault $fault)
{
      echo "Exception : " .$fault->getMessage(). "\n";
}
 
if (isset($idSession))
{
      $clientSOAP->logout($idSession);
}
?>


JAVA

DRSServiceLocator service = new DRSServiceLocator();
String idSession;
StructOptionsZone structOptionsZone;
StructQueryZoneList[] arrayStructQueryZoneList;
 
try
{
      DRSPortType port = service.getDRSPort();
      idSession = port.login("XXXX", "XXXX", "EN");
 
      arrayStructQueryZoneList = port.queryZoneList(idSession, "netim.com");
 
      for (int i=0; i < arrayStructQueryZoneList.length; i++)
      {
            System.out.println(arrayStructQueryZoneList[i].getHost()+" "+arrayStructQueryZoneList[i].getType()+" "+arrayStructQueryZoneList[i].getValue());
 
      structOptionsZone = arrayStructQueryZoneList[i].getOptions();
      System.out.println(structOptionsZone.getService() +" "+ structOptionsZone.getProtocol() +" "+ structOptionsZone.getTtl() +" "+ structOptionsZone.getPriority() +" "+ structOptionsZone.getWeight() +" "+ structOptionsZone.getPort() +"\n");
      }
 
      port.logout(idSession);
}
catch (RemoteException re)
{
      System.out.println(re.getMessage());
}
catch (ServiceException se)
{
      se.printStackTrace();
}
Personal tools
Namespaces

Variants
Actions
Your account
Domain names
Shared Hosting
Old Hosting offers
SSL Certificates
Resellers
Affiliates
Contact Us
Miscellaneous