Skip to main content
Skip table of contents

Root groups

Root groups

List of all root groups (groups that are at the top level, i.e., without parent_id), associated with the current user.

GET /api/admin/v1/root-groups
200 OK

List of groups

JSON
{
    "groups": [
        {
            "id": 97,
            "name": "Cameras",
            "full_pretty": null,
            "is_house": 0,
            "cameras_count": 21,
            "parent_id": null,
            "csa_id": null,
            "intercoms_count": 0
        },
        {
            "id": 103,
            "name": "Cluster1",
            "full_pretty": "Cluster1",
            "is_house": 1,
            "cameras_count": 21,
            "parent_id": null,
            "csa_id": null,
            "intercoms_count": 0
        },
        {
            "id": 104,
            "name": "Cluster2",
            "full_pretty": null,
            "is_house": 0,
            "cameras_count": 0,
            "parent_id": null,
            "csa_id": null,
            "intercoms_count": 0
        }
    ]
}
401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/root-groups' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '[]'
PHP
PHP
$data = array (
);
$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/root-groups', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.