Skip to main content
Skip table of contents

Getting a tree

Getting a tree

If a request is sent without any query parameters, a list of root groups will be returned. If a group has the field is_house set to true, it means that there are no other groups within that group, and it contains cameras. To obtain the cameras List of cameras in a group

GET /api/admin/v1/camera-group

Method parameters

string search, search is performed based on:

  1. Camera address or name

  2. User login, who is the owner of the camera, or legal entity ID

  3. Stream UUID

  4. Camera IP

In case of success, only the part of the tree where a match is found will be returned.


int group_id, ID of the group

200 OK

List of groups

JSON
[
    {
        "id": 159,
        "name": "Region",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 0,
        "parent_id": null,
        "csa_id": 1,
        "intercoms_count": 0
    },
    {
        "id": 149,
        "name": "Region",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 0,
        "parent_id": null,
        "csa_id": 2464,
        "intercoms_count": 0
    },
    {
        "id": 146,
        "name": "City",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 0,
        "parent_id": null,
        "csa_id": 2458,
        "intercoms_count": 0
    },
    {
        "id": 139,
        "name": "City",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 23,
        "parent_id": null,
        "csa_id": 17030,
        "intercoms_count": 7
    },
    {
        "id": 228,
        "name": "Region",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 0,
        "parent_id": null,
        "csa_id": 9397,
        "intercoms_count": 0
    },
    {
        "id": 166,
        "name": "Region",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 0,
        "parent_id": null,
        "csa_id": 12380,
        "intercoms_count": 0
    },
    {
        "id": 124,
        "name": "Cameras",
        "full_pretty": "Cameras",
        "is_house": 1,
        "cameras_count": 7,
        "parent_id": null,
        "csa_id": null,
        "csa": null,
        "intercoms_count": 0
    },
    {
        "id": 97,
        "name": "Cameras",
        "full_pretty": null,
        "is_house": 0,
        "cameras_count": 21,
        "parent_id": null,
        "csa_id": null,
        "intercoms_count": 0
    },
    {
        "id": 248,
        "name": "Cameras",
        "full_pretty": "Cameras",
        "is_house": 1,
        "cameras_count": 5,
        "parent_id": null,
        "csa_id": null,
        "csa": null,
        "intercoms_count": 0
    },
    {
        "id": 136,
        "name": "Street",
        "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/camera-group' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "search": "string",
    "group_id": 0
}'
PHP
PHP
$data = array (
  'search' => 'string',
  'group_id' => 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/camera-group', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.