HostCreate
From NETIM
(Difference between revisions)
m (Text replace - "API Version 1 (Recommended)" to "API Version 1 (Deprecated)") |
|||
(3 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
<tabs> | <tabs> | ||
− | <tab name="API Version 2 ( | + | <tab name="API Version 2 (Recommended)"> |
{| class="wikitable" style="width: 200px;" | {| class="wikitable" style="width: 200px;" | ||
Line 9: | Line 9: | ||
! Runtime | ! Runtime | ||
|- | |- | ||
− | |API >= 2.0|| | + | |API >= 2.0|| Synchronous |
|} | |} | ||
Line 17: | Line 17: | ||
Creates a new host at the registry | Creates a new host at the registry | ||
− | + | [[StructOperationResponse]] hostCreate(string idSession, string host, string[] ipv4, string[] ipv6) | |
Line 39: | Line 39: | ||
'''Return''' | '''Return''' | ||
− | A | + | A structure [[StructOperationResponse]] |
Line 63: | Line 63: | ||
$idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); | $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); | ||
− | $ | + | $StructOperationResponse = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6); |
− | + | ||
+ | print_r($StructOperationResponse); | ||
} | } | ||
catch(SoapFault $fault) | catch(SoapFault $fault) | ||
Line 78: | Line 79: | ||
</source > | </source > | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</tab> | </tab> | ||
− | <tab name="API Version 1 ( | + | <tab name="API Version 1 (Deprecated)"> |
{| class="wikitable" style="width: 200px;" | {| class="wikitable" style="width: 200px;" |
Latest revision as of 15:54, 2 August 2017
Release | Runtime |
---|---|
API >= 2.0 | Synchronous |
Description
Creates a new host at the registry
StructOperationResponse 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 structure StructOperationResponse
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
[edit] 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"); $StructOperationResponse = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6); print_r($StructOperationResponse); } catch(SoapFault $fault) { echo "Exception : " .$fault->getMessage(). "\n"; } if(isset($idSession)) { $clientSOAP->sessionClose($idSession); } ?>
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
[edit] 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(); }