API Commands
[All Commands]

Command: Create_Object



command Create_Object

Creates new nsset or keyset. Only for registries with such capability (for example CZ-NIC or Eurid)

Input Parameters ($data):

string type Object type ("nsset" or "keyset")
string registry Registry for which the object should be created (OPTIONAL, default "CZ-NIC")
array params
contact tech Technical contact
host[] hosts Hostnames of nameservers (ONLY for NSSETs!)
dnskey[] records Array of DNSSEC keys (ONLY for KEYSETs!)

Sample for NSSET:


<?
$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,
        
"order" => array(
                
"type" => "Create_Object",
                
"object" => "SAMPLENSSET",
                
"params" => array(
                        
"type" => "nsset",
                        
"params" => array(
                                
"tech" => array(
                                        
"id" => "G-000003"
                                
),
                                
"hosts" => array(
                                        array(
                                                
"hostname" => "ns.gransy.com"
                                        
),
                                        array(
                                                
"hostname" => "ns2.gransy.com"
                                        
),
                                        array(
                                                
"hostname" => "ns3.gransy.com"
                                        
),
                                        array(
                                                
"hostname" => "ns4.gransy.com"
                                        
),
                                        array(
                                                
"hostname" => "ns5.gransy.com"
                                        
)
                                )
                        )
                )
        )
    )
);

$response $client->__call("Make_Order",$params);

?>
INPUT: Array ( [ssid] => bf5c2154638305f8804048e848e70197 [order] => Array ( [type] => Create_Object [object] => SAMPLENSSET [params] => Array ( [type] => nsset [params] => Array ( [tech] => Array ( [id] => G-000003 ) [hosts] => Array ( [0] => Array ( [hostname] => ns.gransy.com ) [1] => Array ( [hostname] => ns2.gransy.com ) [2] => Array ( [hostname] => ns3.gransy.com ) [3] => Array ( [hostname] => ns4.gransy.com ) [4] => Array ( [hostname] => ns5.gransy.com ) ) ) ) ) ) OUTPUT: Array ( [status] => ok [data] => Array ( [orderid] => 123456 ) )

Sample for KEYSET:


<?
$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,
        
"order" => array(
                
"type" => "Create_Object",
                
"object" => "SAMPLEKEYSET",
                
"params" => array(
                        
"type" => "keyset",
                        
"registry" => "Eurid",
                        
"params" => array(
                                
"tech" => array(
                                        
"id" => "G-000003"
                                
),
                                
"records" => array(
                                        array(
                                                
"tag" => 52247,
                                                
"flag" => 257,
                                                
"protocol" => 3,
                                                
"alg" => 7,
                                                
"key" => "BQEAAAA...UgkO7BUjlprbnk="
                                        
)
                                )
                        )
                )
        )
    )
);

$response $client->__call("Make_Order",$params);

?>
INPUT: Array ( [ssid] => 0920b501d7823ba11d550fa4e547b3b9 [order] => Array ( [type] => Create_Object [object] => SAMPLEKEYSET [params] => Array ( [type] => keyset [registry] => Eurid [params] => Array ( [tech] => Array ( [id] => G-000003 ) [records] => Array ( [0] => Array ( [tag] => 52247 [flag] => 257 [protocol] => 3 [alg] => 7 [key] => BQEAAAA...UgkO7BUjlprbnk= ) ) ) ) ) ) OUTPUT: Array ( [status] => ok [data] => Array ( [orderid] => 123456 ) )

API Manual - version from 2017-03-07 10:42:19