HostCreate

From NETIM
(Difference between revisions)
Jump to: navigation, search
m (Text replace - "−>" to "->")
Line 1: Line 1:
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
 +
 +
<tabs>
 +
<tab name="API Version 2 (Coming soon)">
 +
 +
{| class="wikitable" style="width: 200px;"
 +
! Release
 +
! Runtime
 +
|-
 +
|API >= 2.0|| Asynchronous
 +
|}
 +
 +
 +
'''Description'''
 +
 +
Creates a new host at the registry
 +
 +
int hostCreate(string idSession, string host, string[] ipv4, string[] ipv6)
 +
 +
 +
'''Parameters'''
 +
{| class="wikitable" style="width: 800px;"
 +
! Format
 +
! Variable
 +
! Description
 +
! Notes
 +
|-
 +
|style="width: 100;" | string (32)|| style="width: 100;" | idSession || style="width: 200;" | Session ID|| style="width: 400;" |
 +
|-
 +
|string (255)|| host || Hostname || ''example : "ns1.example.com"
 +
|-
 +
|ArrayOfString|| ipv4  || Array of IPv4 addresses||
 +
|-
 +
|ArrayOfString|| ipv6  || Array of IPv6 addresses||
 +
|}
 +
 +
 +
'''Return'''
 +
 +
A tracking ID
 +
 +
 +
'''Notes'''
 +
 +
At least one IP must be provided (IPv4 or IPv6).
 +
To function properly, the host must be declared in the DNS settings of the domain with all corresponding A records (for IPv4) and AAAA records (for IPv6)
 +
All registries doesn't manage "Host" objects, see [[:Category:Tld]]
 +
 +
 +
== Examples ==
 +
 +
''' PHP '''
 +
<source lang="php">
 +
<?php
 +
$clientSOAP = new SoapClient("http://URL.wsdl");
 +
$host = "xxx.example.com";
 +
$ipv4 = array("192.134.0.129");
 +
$ipv6 = array("2001:660:3006:4:0:0:1:1");
 +
 +
try
 +
{
 +
      $idSession = $clientSOAP->login("XXXX", "XXXX", "EN");
 +
     
 +
      $trackingID = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6);
 +
      echo($trackingID);
 +
}
 +
catch(SoapFault $fault)
 +
{
 +
      echo "Exception : " .$fault->getMessage(). "\n";
 +
}
 +
 +
if(isset($idSession))
 +
{
 +
      $clientSOAP->logout($idSession);
 +
}
 +
?>
 +
</source >
 +
 +
 +
''' JAVA'''
 +
<source lang="java">
 +
DRSServiceLocator service = new DRSServiceLocator();
 +
String idSession;
 +
int trackingID;
 +
String host = "xxx.example.com";
 +
String ipv4[] = {"192.134.0.129"};
 +
String ipv6[] = {"2001:660:3006:4:0:0:1:1"};
 +
 +
try
 +
{
 +
      DRSPortType port = service.getDRSPort();
 +
      idSession = port.login("XXXX", "XXXX", "EN");
 +
 +
      trackingID = port.hostCreate(idSession, host, ipv4[], ipv6[]);
 +
      System.out.println(trackingID);
 +
 +
      port.logout(idSession);
 +
}
 +
catch (RemoteException re)
 +
{
 +
      System.out.println(re.getMessage());
 +
}
 +
catch (ServiceException se)
 +
{
 +
      se.printStackTrace();
 +
}
 +
</source>
 +
 +
</tab>
 +
<tab name="API Version 1 (Recommended)">
 +
 
{| class="wikitable" style="width: 200px;"
 
{| class="wikitable" style="width: 200px;"
 
! Release
 
! Release
Line 102: Line 213:
 
}
 
}
 
</source>
 
</source>
 +
 +
</tab>
 +
</tabs>

Revision as of 16:26, 24 February 2017


Release Runtime
API >= 2.0 Asynchronous


Description

Creates a new host at the registry

int hostCreate(string idSession, string host, string[] ipv4, string[] ipv6)


Parameters

Format Variable Description Notes
string (32) idSession Session ID
string (255) host Hostname example : "ns1.example.com"
ArrayOfString ipv4 Array of IPv4 addresses
ArrayOfString ipv6 Array of IPv6 addresses


Return

A tracking ID


Notes

At least one IP must be provided (IPv4 or IPv6).
To function properly, the host must be declared in the DNS settings of the domain with all corresponding A records (for IPv4) and AAAA records (for IPv6)
All registries doesn't manage "Host" objects, see Category:Tld


Examples

PHP

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
$host = "xxx.example.com"; 
$ipv4 = array("192.134.0.129"); 
$ipv6 = array("2001:660:3006:4:0:0:1:1"); 
 
try 
{ 
      $idSession = $clientSOAP->login("XXXX", "XXXX", "EN"); 
 
      $trackingID = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6); 
      echo($trackingID); 
} 
catch(SoapFault $fault) 
{ 
      echo "Exception : " .$fault->getMessage(). "\n"; 
} 
 
if(isset($idSession)) 
{ 
      $clientSOAP->logout($idSession); 
} 
?>


JAVA

DRSServiceLocator service = new DRSServiceLocator(); 
String idSession; 
int trackingID; 
String host = "xxx.example.com"; 
String ipv4[] = {"192.134.0.129"}; 
String ipv6[] = {"2001:660:3006:4:0:0:1:1"}; 
 
try 
{ 
      DRSPortType port = service.getDRSPort(); 
      idSession = port.login("XXXX", "XXXX", "EN"); 
 
      trackingID = port.hostCreate(idSession, host, ipv4[], ipv6[]); 
      System.out.println(trackingID); 
 
      port.logout(idSession); 
} 
catch (RemoteException re) 
{ 
      System.out.println(re.getMessage()); 
} 
catch (ServiceException se) 
{ 
      se.printStackTrace(); 
}
Release Runtime
API > 1.32 Asynchronous


Description

Creates a new host at the registry

int hostCreate(string idSession, string host, string[] ipv4, string[] ipv6)


Parameters

Format Variable Description Notes
string (32) idSession Session ID
string (255) host Hostname example : "ns1.example.com"
ArrayOfString ipv4 Array of IPv4 addresses
ArrayOfString ipv6 Array of IPv6 addresses


Return

A tracking ID


Notes

At least one IP must be provided (IPv4 or IPv6).
To function properly, the host must be declared in the DNS settings of the domain with all corresponding A records (for IPv4) and AAAA records (for IPv6)
All registries doesn't manage "Host" objects, see Category:Tld


Examples

PHP

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
$host = "xxx.example.com"; 
$ipv4 = array("192.134.0.129"); 
$ipv6 = array("2001:660:3006:4:0:0:1:1"); 
 
try 
{ 
      $idSession = $clientSOAP->login("XXXX", "XXXX", "EN"); 
 
      $trackingID = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6); 
      echo($trackingID); 
} 
catch(SoapFault $fault) 
{ 
      echo "Exception : " .$fault->getMessage(). "\n"; 
} 
 
if(isset($idSession)) 
{ 
      $clientSOAP->logout($idSession); 
} 
?>


JAVA

DRSServiceLocator service = new DRSServiceLocator(); 
String idSession; 
int trackingID; 
String host = "xxx.example.com"; 
String ipv4[] = {"192.134.0.129"}; 
String ipv6[] = {"2001:660:3006:4:0:0:1:1"}; 
 
try 
{ 
      DRSPortType port = service.getDRSPort(); 
      idSession = port.login("XXXX", "XXXX", "EN"); 
 
      trackingID = port.hostCreate(idSession, host, ipv4[], ipv6[]); 
      System.out.println(trackingID); 
 
      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