Admin update
Admin update
Admin update
PUT api/admin/v1/admins/{user} |
Method parameters
int
user, unique identifier of the administrator
string
name, name
string
login, unique login among other administrators
string
password, password
string
password_confirmation, re-entered password to ensure it is entered correctly
array
permissions, array of permission IDs (belonging to administrators)
array
admin_camera_groups, array of group IDs (belonging to the current administrator)
array
admin_intercom_groups, массив id групп домофона (принадлежащих текущему администратору)
array
dhcp_subnet_groups, array of DHCP subnet group IDs (belonging to the current administrator)
200 |
Returns an administrator object
JSON
|
401 |
Authorization token is not provided or invalid |
422 |
Returns a JSON object with an error. Validation
JSON
|
curl -k --request POST \
--url 'https://your-domainapi/admin/v1/admins/{user}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"user": 0,
"name": "string",
"login": "string",
"password": "string",
"password_confirmation": "string",
"permissions": [],
"admin_camera_groups": [],
"admin_intercom_groups": [],
"dhcp_subnet_groups": []
}'
$data = array (
'user' => 0,
'name' => 'string',
'login' => 'string',
'password' => 'string',
'password_confirmation' => 'string',
'permissions' =>
array (
),
'admin_camera_groups' =>
array (
),
'admin_intercom_groups' =>
array (
),
'dhcp_subnet_groups' =>
array (
),
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'PUT',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domainapi/admin/v1/admins/{user}', false, $context);