API Commands
[All Commands]

Command: Set_DNS_Zone



command Set_DNS_Zone

Specify complete set of records for certain zone. Specified records will replace ALL present records.

Input Parameters ($data):

string ssid Token from Login
string domain Registered domain
array records List of DNS records
string name Hostname (part of hostname, without registered domain)
string type Type of DNS record
string content Value of this record (IP address, hostname, text value etc.)
int prio Priority of this record (MX records only)
int ttl TTL value

Output Responses:

string status ok | error

Sample:


<?php
$client 
= new SoapClient(
        
null
        array(
            
"location" => "https://PRODUCTION/cmd.php",
            
"uri" => "http://PRODUCTION/soap"
            
)
        );

$params = array ( 
    
"data" => array (
        
"login" => "demo",
        
"password" => "password",
    )
);

$response $client->__call("Login",$params);
$token $response["data"]["ssid"];

$params = array (
  
'data' => 
  array (
    
'ssid' => $token,
    
'domain' => 'exampledomain.com',
    
'records' => 
    array (
      
=> 
      array (
        
'name' => 'sub',
        
'type' => 'CNAME',
        
'content' => 'anotherdomain.com',
        
'prio' => '0',
        
'ttl' => '1800',
      ),
      
=> 
      array (
        
'name' => '@',
        
'type' => 'A',
        
'content' => '1.2.3.4',
        
'prio' => '0',
        
'ttl' => '900',
      ),
    ),
  ),
);

$response $client->__call("Set_DNS_Zone",$params);
INPUT: Array ( [data] => Array ( [ssid] => 51aca4e95c12821b56a9045babc943e7 [domain] => exampledomain.com [records] => Array ( [0] => Array ( [name] => sub [type] => CNAME [content] => anotherdomain.com [prio] => 0 [ttl] => 1800 ) [1] => Array ( [name] => @ [type] => A [content] => 1.2.3.4 [prio] => 0 [ttl] => 900 ) ) ) ) OUTPUT: Array ( [status] => ok )

API Manual - version from 2023-05-12 12:15:50