update_superusersettings()

Update superuser account settings.

Only the main account can call this function. It can then edit specific settings of its subaccounts.

Signature

update_superusersettings(array $parameters): mixed

Parameters

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
account_login The account login to update Required
ssh_access Enables SSH access for an account: Y|N Optional
ssh_keys SSH keys for public key authentication Optional

PHP example

<?php

// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
    'account_login' => 'w0123456',
    'ssh_access' => 'Y',
];

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' => 'update_superusersettings',
        'KasRequestParams' => $parameters,
    ]));
    print_r($response);
} catch (SoapFault $fault) {
    echo 'Error: ' . $fault->faultstring;
}

Responses and error codes

  • TRUE the action was carried out
  • missing_parameter a required parameter is missing
  • in_progress the KAS object is currently being processed
  • nothing_to_do nothing was changed
  • account_doesnt_belong_to_you
  • kas_login_is_no_main_login kas_login is not the main account
  • settings_not_in_contract
  • ssh_access_syntax_incorrect
  • ssh_keys_syntax_incorrect