DomainZoneCreate
From NETIM
(Difference between revisions)
m (Text replace - "API Version 1 (Recommended)" to "API Version 1 (Deprecated)") |
|||
(4 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 17: | Line 17: | ||
Creates a DNS record into the domain zonefile | Creates a DNS record into the domain zonefile | ||
− | + | [[StructOperationResponse]] domainZoneCreate(string idSession, string domain, string subdomain, string type, string value, [[StructOptionsZone]] options) | |
Line 61: | Line 61: | ||
'''Return''' | '''Return''' | ||
− | A | + | A structure [[StructOperationResponse]] |
Line 75: | Line 75: | ||
<?php | <?php | ||
$clientSOAP = new SoapClient("http://URL.wsdl"); | $clientSOAP = new SoapClient("http://URL.wsdl"); | ||
− | $structOptionsZone = array(); | + | $structOptionsZone = array('service' => '', 'protocol' => '', 'ttl' => '', 'priority' => '', 'weight' => '', 'port' => ''); |
try | try | ||
{ | { | ||
$idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); | $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); | ||
− | $ | + | $StructOperationResponse = $clientSOAP->domainZoneCreate($idSession, "netim.com", "www", "A", "192.168.0.1", $structOptionsZone); |
− | + | print_r($StructOperationResponse); | |
} | } | ||
catch(SoapFault $fault) | catch(SoapFault $fault) | ||
Line 96: | Line 96: | ||
</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;" | ||
Line 197: | Line 170: | ||
<?php | <?php | ||
$clientSOAP = new SoapClient("http://URL.wsdl"); | $clientSOAP = new SoapClient("http://URL.wsdl"); | ||
− | $structOptionsZone = array(); | + | $structOptionsZone = array('service' => '', 'protocol' => '', 'ttl' => '', 'priority' => '', 'weight' => '', 'port' => ''); |
try | try |
Latest revision as of 15:52, 2 August 2017
Release | Runtime |
---|---|
API >= 2.0 | Synchronous |
Description
Creates a DNS record into the domain zonefile
StructOperationResponse domainZoneCreate(string idSession, string domain, string subdomain, string type, string value, StructOptionsZone options)
Parameters
Format | Variable | Description | Notes |
---|---|---|---|
string (32) | idSession | Session ID | |
string (255) | domain | Domain name | |
string (255) | subdomain | Sub domain | |
string | type | Type of DNS record | A / AAAA / MX / CNAME / TXT / NS / SRV |
string (150) | value | Value of the new DNS record | |
StructOptionsZone | options | Settings of the new DNS record |
List of DNS record types and acceptable values
Type | Value |
---|---|
A | IPv4 Address |
AAAA | IPv6 Address |
MX | fully qualified domain name of the mailserver |
CNAME | fully qualified domain name |
NS | fully qualified domain name of the DNS server |
Return
A structure StructOperationResponse
Notes
none
[edit] Examples
PHP
<?php $clientSOAP = new SoapClient("http://URL.wsdl"); $structOptionsZone = array('service' => '', 'protocol' => '', 'ttl' => '', 'priority' => '', 'weight' => '', 'port' => ''); try { $idSession = $clientSOAP->sessionOpen("XXXX", "XXXX", "EN"); $StructOperationResponse = $clientSOAP->domainZoneCreate($idSession, "netim.com", "www", "A", "192.168.0.1", $structOptionsZone); print_r($StructOperationResponse); } catch(SoapFault $fault) { echo "Exception : " .$fault->getMessage(). "\n"; } if (isset($idSession)) { $clientSOAP->sessionClose($idSession); } ?>
Release | Runtime |
---|---|
API > 1.0 | Synchronous |
Description
Creates a DNS record into the domain zonefile
int domainZoneCreate(string idSession, string domain, string subdomain, string type, string value, StructOptionsZone options)
Parameters
Format | Variable | Description | Notes |
---|---|---|---|
string (32) | idSession | Session ID | |
string (255) | domain | Domain name | |
string (255) | subdomain | Sub domain | |
string | type | Type of DNS record | A / AAAA / MX / CNAME / TXT / NS / SRV |
string (150) | value | Value of the new DNS record | |
StructOptionsZone | options | Settings of the new DNS record |
List of DNS record types and acceptable values
Type | Value |
---|---|
A | IPv4 Address |
AAAA | IPv6 Address |
MX | fully qualified domain name of the mailserver |
CNAME | fully qualified domain name |
NS | fully qualified domain name of the DNS server |
Return
A tracking number
Notes
none
[edit] Examples
PHP
<?php $clientSOAP = new SoapClient("http://URL.wsdl"); $structOptionsZone = array('service' => '', 'protocol' => '', 'ttl' => '', 'priority' => '', 'weight' => '', 'port' => ''); try { $idSession = $clientSOAP->login("XXXX", "XXXX", "EN"); $trackingID = $clientSOAP->domainZoneCreate($idSession, "netim.com", "www", "A", "192.168.0.1", $structOptionsZone); 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; StructOptionsZone structOptionsZone = new StructOptionsZone(); try { DRSPortType port = service.getDRSPort(); idSession = port.login("XXXX", "XXXX", "EN"); trackingID = port.domainZoneCreate(idSession, "netim.com", "www", "A", "192.168.0.1", structOptionsZone); System.out.println(trackingID); port.logout(idSession); } catch (RemoteException re) { System.out.println(re.getMessage()); } catch (ServiceException se) { se.printStackTrace(); }