move_subdomain()
Move a subdomain.
Signature
move_subdomain(array $parameters): mixedParameters
Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.
| Name | Description | Requirement |
|---|---|---|
subdomain_name |
The host name to move | Required |
source_account |
The source account | Required |
target_account |
The target account | Required |
PHP example
<?php
// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
'subdomain_name' => 'sub.example.com',
'source_account' => 'w000XXXX',
'target_account' => 'w000YYYY',
];
try {
$client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
$response = $client->KasApi(json_encode([
'kas_login' => 'w0123456',
'kas_auth_type' => 'session',
'kas_auth_data' => $sessionToken,
'kas_action' => 'move_subdomain',
'KasRequestParams' => $parameters,
]));
print_r($response);
} catch (SoapFault $fault) {
echo 'Error: ' . $fault->faultstring;
}
Responses and error codes
-
TRUEthe action was carried out -
missing_parametera required parameter is missing -
in_progressthe KAS object is currently being processed -
nothing_to_donothing was changed -
kas_login_syntax_incorrect -
target_is_equal_to_source -
host_is_dummyhost -
account_doesnt_belong_to_you -
subdomain_not_found_in_kas -
no_valid_parent_domain_there -
target_is_dummyaccount -
subdomain_has_active_fpse -
max_subdomain_for_subaccount_gt_change_value -
max_mail_account_for_subaccount_gt_change_value -
max_mail_forward_for_subaccount_gt_change_value -
max_mailinglist_for_subaccount_gt_change_value