Skip to main content
Skip table of contents

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 OK

Returns an administrator object

JSON
{
    "id": 117,
    "name": "Name",
    "login": "user@mail.com",
    "created_at": "2022-05-11 18:40:46",
    "updated_at": "2022-05-11 18:40:46",
    "expired_at": null,
    "is_licence_limit_reached": false,
    "permissions": [
        {
            "id": 77,
            "name": "archives-preview-download",
            "display_name": "Saving a camera screenshot",
            "group": "Screenshots"
        },
        {
            "id": 149,
            "name": "packs-index",
            "display_name": "Viewing a list of media server groups",
            "group": "Media server groups"
        },
        {
            "id": 150,
            "name": "packs-show",
            "display_name": "Viewing a media server group",
            "group": "Media server groups"
        },
        {
            "id": 151,
            "name": "packs-store",
            "display_name": "Saving a media server group",
            "group": "Media server groups"
        },
        {
            "id": 152,
            "name": "packs-update",
            "display_name": "Updating a media server group",
            "group": "Media server groups"
        },
        {
            "id": 153,
            "name": "packs-destroy",
            "display_name": "Deleting a media server group",
            "group": "Media server groups"
        }
    ],
    "ptz_priority": null,
    "admin_camera_groups": [],
    "dhcp_subnet_groups": [],
    "access_token_id": null
}

401 Unauthorized

Authorization token is not provided or invalid

422 Unprocessable Entity

Returns a JSON object with an error. Validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The reason for the error will be described here"
        ]
    }
}
cURL
BASH
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": []
}'
PHP
PHP
$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);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.