new update

master
zeena 2023-07-23 10:46:34 +03:00
parent 9e7a4bd4da
commit 1ef02380b9
1 changed files with 51 additions and 2 deletions

View File

@ -9,8 +9,8 @@ $api->login();
$res = $api->post('user', [ $res = $api->post('user', [
"username" => "testusertest23", "username" => "testusertest23",
"enabled" => 1, "enabled" => 1,
"password" => null, "password" => "asdfghjkl",
"confirm_password" => null, "confirm_password" => "asdfghjkl",
"profile_id" => 2, "profile_id" => 2,
"parent_id" => 1, "parent_id" => 1,
"site_id" => null, "site_id" => null,
@ -43,3 +43,52 @@ $res = $api->post('user', [
"restricted" => 0 "restricted" => 0
]); ]);
print_r(json_decode($res)); print_r(json_decode($res));
//this is the expected response
//stdClass Object
//(
// [status] => 200
// [message] => rsp_save_success
// [data] => stdClass Object
// (
// [username] => testusertest23
// [enabled] => 1
// [profile_id] => 2
// [parent_id] => 1
// [site_id] =>
// [mac_auth] => 0
// [use_separate_portal_password] => 0
// [group_id] => 3
// [firstname] =>
// [lastname] =>
// [company] =>
// [email] =>
// [phone] =>
// [city] =>
// [address] =>
// [apartment] =>
// [street] =>
// [contract_id] =>
// [national_id] =>
// [notes] =>
// [auto_renew] => 0
// [expiration] => 2023-07-23 09:57:54
// [simultaneous_sessions] => 1
// [static_ip] =>
// [mikrotik_winbox_group] =>
// [mikrotik_framed_route] =>
// [mikrotik_addresslist] =>
// [mikrotik_ipv6_prefix] =>
// [user_type] => 0
// [restricted] => 0
// [created_by] => 1
// [updated_at] => 2023-07-23 10:45:50
// [created_at] => 2023-07-23 10:45:50
// [id] => 9786
// [parent_username] => admin
// )
//
//)