58 lines
1.2 KiB
PHP
58 lines
1.2 KiB
PHP
<?php
|
|
|
|
require_once 'SASConnector.php';
|
|
|
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
|
$api->login();
|
|
|
|
|
|
$res = $api->put('manager/128', [
|
|
"enabled" => 1,
|
|
"password" => null,
|
|
"confirm_password" => null,
|
|
"acl_group_id" => 23,
|
|
"parent_id" => 5,
|
|
"firstname" => "ahmed",
|
|
"lastname" => "salim",
|
|
"company" => null,
|
|
"email" => null,
|
|
"phone" => null,
|
|
"city" => null,
|
|
"address" => null,
|
|
"notes" => null,
|
|
"subscriber_prefix" => null,
|
|
"subscriber_suffix" => null,
|
|
"max_users" => 0,
|
|
"group_id" => null,
|
|
"site_id" => null,
|
|
"debt_limit" => "0.000",
|
|
"discount_rate" => "0.00",
|
|
"mikrotik_addresslist" => null,
|
|
"allowed_ppp_services" => null,
|
|
"allowed_nases" => [],
|
|
"requires_2fa" => 0,
|
|
"ignore_captcha" => 0,
|
|
"admin_notes" => null,
|
|
"force_change_password" => 0,
|
|
"limit_delete" => 0,
|
|
"limit_delete_count" => 0,
|
|
"limit_rename" => 0,
|
|
"limit_rename_count" => 0,
|
|
"limit_profile_change" => 0,
|
|
"limit_profile_change_count" => 0,
|
|
"limit_mac_change" => 0,
|
|
"limit_mac_change_count" => 0
|
|
]);
|
|
|
|
print_r(json_decode($res));
|
|
|
|
//this is the expected response
|
|
|
|
//stdClass Object
|
|
//(
|
|
// [status] => 200
|
|
// [message] => rsp_manager_updated
|
|
//)
|
|
|
|
|