HostCreate
From NETIM
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->sessionOpen("XXXX", "XXXX", "EN"); $trackingID = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6); echo($trackingID); } catch(SoapFault $fault) { echo "Exception : " .$fault->getMessage(). "\n"; } if(isset($idSession)) { $clientSOAP->sessionClose($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.sessionOpen("XXXX", "XXXX", "EN"); trackingID = port.hostCreate(idSession, host, ipv4[], ipv6[]); System.out.println(trackingID); port.sessionClose(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(); }