HostCreate

From NETIM
(Difference between revisions)
Jump to: navigation, search
(Pushed from Centre de support - FranceDNS.)
 
m (Text replace - "API Version 1 (Recommended)" to "API Version 1 (Deprecated)")
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Fonctions]]
+
[[Category:Functions]]
 +
 
 +
 
 +
<tabs>
 +
<tab name="API Version 2 (Recommended)">
 +
 
 +
{| class="wikitable" style="width: 200px;"
 +
! 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'''
 +
{| 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 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]]
 +
 
 +
 
 +
== 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->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);
 +
}
 +
?>
 +
</source >
 +
 
 +
 
 +
</tab>
 +
<tab name="API Version 1 (Deprecated)">
 +
 
 
{| class="wikitable" style="width: 200px;"
 
{| class="wikitable" style="width: 200px;"
! Version
+
! Release
! Exécution
+
! Runtime
 
|-
 
|-
|API > 1.32|| Asynchrone
+
|API > 1.32|| Asynchronous
 
|}
 
|}
  
Line 10: Line 93:
 
'''Description'''
 
'''Description'''
  
Créé un nouvel host auprès du registre
+
Creates a new host at the registry
  
 
  int hostCreate(string idSession, string host, string[] ipv4, string[] ipv6)
 
  int hostCreate(string idSession, string host, string[] ipv4, string[] ipv6)
  
  
'''Liste des paramètres'''
+
'''Parameters'''
 
{| class="wikitable" style="width: 800px;"
 
{| class="wikitable" style="width: 800px;"
 
! Format
 
! Format
Line 22: Line 105:
 
! Notes
 
! Notes
 
|-
 
|-
|style="width: 100;" | string (32)|| style="width: 100;" | idSession || style="width: 200;" | Identifiant de la session || style="width: 400;" |
+
|style="width: 100;" | string (32)|| style="width: 100;" | idSession || style="width: 200;" | Session ID|| style="width: 400;" |
 
|-
 
|-
|string (255)|| host || Nom du host || ''exemple : "ns1.example.com"  
+
|string (255)|| host || Hostname || ''example : "ns1.example.com"  
 
|-
 
|-
|ArrayOfString|| ipv4  || Tableau des adresses IPv4||  
+
|ArrayOfString|| ipv4  || Array of IPv4 addresses||  
 
|-
 
|-
|ArrayOfString|| ipv6  || Tableau des adresses IPv6 ||  
+
|ArrayOfString|| ipv6  || Array of IPv6 addresses||  
 
|}
 
|}
  
  
'''Valeurs de retour'''
+
'''Return'''
  
  Un numéro d'opération
+
  A tracking ID
  
  
 
'''Notes'''
 
'''Notes'''
  
  Au moins une IP doit être fournies IPv4 ou IPv6.
+
  At least one IP must be provided (IPv4 or IPv6).
  Pour fonctionner correctement, le host devra être déclaré dans la configuration DNS du domaine<br> avec autant d'enregistrement de type A que d'IPv4 et de type AAAA que d'IPv6 définies.
+
  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)
  Tous les registres ne supportent pas les objets "Host", consultez les opérations ouvertes pour l'extension.
+
  All registries doesn't manage "Host" objects, see [[:Category:Tld]]
  
  
== Exemples ==
+
== Examples ==
  
''' Langage PHP '''
+
''' PHP '''
 
<source lang="php">
 
<source lang="php">
 
<?php  
 
<?php  
$clientSOAP = new SoapClient("http://drs.netim.com/1.4/DRS.wsdl");  
+
$clientSOAP = new SoapClient("http://URL.wsdl");
 
$host = "xxx.example.com";  
 
$host = "xxx.example.com";  
 
$ipv4 = array("192.134.0.129");  
 
$ipv4 = array("192.134.0.129");  
Line 56: Line 139:
 
try  
 
try  
 
{  
 
{  
       $idSession = $clientSOAP−>login("XXXX", "XXXX", "EN");  
+
       $idSession = $clientSOAP->login("XXXX", "XXXX", "EN");  
 
        
 
        
       $trackingID = $clientSOAP−>hostCreate($idSession, $host, $ipv4, $ipv6);  
+
       $trackingID = $clientSOAP->hostCreate($idSession, $host, $ipv4, $ipv6);  
 
       echo($trackingID);  
 
       echo($trackingID);  
 
}  
 
}  
 
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 74: Line 157:
  
  
''' Langage JAVA'''
+
''' JAVA'''
 
<source lang="java">
 
<source lang="java">
 
DRSServiceLocator service = new DRSServiceLocator();  
 
DRSServiceLocator service = new DRSServiceLocator();  
Line 102: Line 185:
 
}
 
}
 
</source>
 
</source>
 +
 +
</tab>
 +
</tabs>

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(); 
}
Personal tools
Namespaces

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