update_directoryprotection()

Update directory protection.

All API functions Directory Protection

Signature

update_directoryprotection(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
directory_user The login Required
directory_path The path Required
directory_password The new password Required
directory_authname The comment Required

PHP example

<?php

// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
    'directory_path' => 'directory',
    'directory_user' => 'login',
    'directory_password' => 'password',
];

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_directoryprotection',
        '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
  • directory_password_syntax_incorrect
  • directory_path_syntax_incorrect
  • directory_user_syntax_incorrect
  • directory_authname_syntax_incorrect