Skip to main content
Skip table of contents

Admin view

Admin view

Admin view

GET /api/admin/v1/admins/{user}

Method parameters

int user, unique administrator identifier

200 OK

Returns an administrator object

JSON
{
    "id": 87,
    "name": "Name",
    "login": "user@mail.com",
    "created_at": "2022-03-24 11:26:58",
    "updated_at": "2022-03-30 16:48:54",
    "expired_at": null,
    "is_licence_limit_reached": false,
    "permissions": [
        {
            "id": 72,
            "name": "streams-update",
            "display_name": "Update video stream",
            "group": "Video streams"
        },
        {
            "id": 115,
            "name": "dhcp-subnets-destroy",
            "display_name": "Remove DHCP network",
            "group": "DHCP subnets"
        },
        {
            "id": 120,
            "name": "servers-update",
            "display_name": "Update media server",
            "group": "Servers"
        }
    ],
    "ptz_priority": 10,
    "admin_camera_groups": [
        {
            "id": 97,
            "name": "Cameras",
            "full_pretty": null,
            "is_house": 0,
            "cameras_count": 27,
            "parent_id": null,
            "csa_id": null,
            "intercoms_count": 315
        }
    ],
    "dhcp_subnet_groups": [],
    "access_token_id": null
}

401 Unauthorized

Authorization token not passed or invalid. Obtaining a token

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/admins/{user}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "user": 0
}'
PHP
PHP
$data = array (
  'user' => 0,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/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.