46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once 'SASConnector.php';
|
|
|
|
$api = new SASConnector('172.16.12.108', 'admin', 'admin');
|
|
$api->login();
|
|
|
|
|
|
$res = $api->post('user', [
|
|
"username" => "testusertest23",
|
|
"enabled" => 1,
|
|
"password" => null,
|
|
"confirm_password" => null,
|
|
"profile_id" => 2,
|
|
"parent_id" => 1,
|
|
"site_id" => null,
|
|
"mac_auth" => 0,
|
|
"allowed_macs" => null,
|
|
"use_separate_portal_password" => 0,
|
|
"portal_password" => null,
|
|
"group_id" => 3,
|
|
"firstname" => null,
|
|
"lastname" => null,
|
|
"company" => null,
|
|
"email" => null,
|
|
"phone" => null,
|
|
"city" => null,
|
|
"address" => null,
|
|
"apartment" => null,
|
|
"street" => null,
|
|
"contract_id" => null,
|
|
"national_id" => null,
|
|
"notes" => null,
|
|
"auto_renew" => 0,
|
|
"expiration" => "2023-07-23 09:57:54",
|
|
"simultaneous_sessions" => 1,
|
|
"static_ip" => null,
|
|
"mikrotik_winbox_group" => null,
|
|
"mikrotik_framed_route" => null,
|
|
"mikrotik_addresslist" => null,
|
|
"mikrotik_ipv6_prefix" => null,
|
|
"user_type" => "0",
|
|
"restricted" => 0
|
|
]);
|
|
print_r(json_decode($res));
|