Skip to main content
Skip table of contents

Tree search

Tree search

Camera tree search. If none of the search parameters are provided, a 422 error will be returned.

GET /api/admin/v1/cameras/search/tree

Method parameters

string search, search performed based on the address


string vendor_name, search performed based on the camera vendor (manufacturer)


string model_name, search performed based on the camera model


string service, search performed based on the services of configurations applied to the camera


string tags, search performed based on the name of the tag associated with the camera


boolean is_intercom, cameras that are related to an intercom system or not

200 OK

Returns a list of cameras on page i of pagination

JSON
[
    {
        "id": 1,
        "name": "Address 1",
        "children": [
            {
                "id": 16103,
                "name": "Address 2",
                "children": [
                    {
                        "id": 35602,
                        "name": "113",
                        "children": null,
                        "full_pretty": "Address 1, Address 2, Address 3",
                        "cameras": [
                            {
                                "id": 72178,
                                "group_id": 35602,
                                "status": "active",
                                "type": "media_server_v2",
                                "pretty_text": "Address 1, Address 2, Address 3",
                                "short_pretty": "Address 2, Address 3",
                                "start_at": "2023-04-18 14:17:08",
                                "created_at": "2020-09-29 19:19:09",
                                "name": "Camera 1",
                                "can_edit": true,
                                "origin": null,
                                "group_type": "private",
                                "shared_from": null,
                                "ip": "10.10.5.98",
                                "lat": null,
                                "lng": null,
                                "azimuth": null,
                                "is_sensitive": 0,
                                "is_public": 0,
                                "is_ip_reserved": false,
                                "count_issues": 0,
                                "source": "manual",
                                "archive_storage_days": 30,
                                "is_archive_recording": true,
                                "archive_recording_type": "fulltime",
                                "is_increased_reconnect": 0,
                                "is_sound_enabled": true,
                                "is_bridge": false,
                                "can_change_archive_timetable": true,
                                "is_auto_create_streams": false,
                                "is_provisioning_enable": false,
                                "is_can_manage_archive_storage_days": true,
                                "is_editable": true,
                                "status_changed_at": "2023-04-21 19:01:34",
                                "is_intercom": false,
                                "deleted_at": ""
                            }
                        ]
                    },
                    {
                        "id": 36175,
                        "name": "115",
                        "children": null,
                        "full_pretty": "Address 1, Address 2, Address 4",
                        "cameras": [
                            {
                                "id": 72853,
                                "group_id": 36175,
                                "status": "active",
                                "type": "media_server_v2",
                                "pretty_text": "Address 1, Address 2, Address 4",
                                "short_pretty": "Address 2, Address 4",
                                "start_at": "2023-04-18 14:17:08",
                                "created_at": "2020-09-30 16:17:58",
                                "name": "Camera 2",
                                "can_edit": true,
                                "origin": null,
                                "group_type": "legal",
                                "shared_from": null,
                                "ip": "10.10.5.106",
                                "lat": null,
                                "lng": null,
                                "azimuth": null,
                                "is_sensitive": 0,
                                "is_public": 0,
                                "is_ip_reserved": false,
                                "count_issues": 0,
                                "source": "manual",
                                "archive_storage_days": 30,
                                "is_archive_recording": true,
                                "archive_recording_type": "fulltime",
                                "is_increased_reconnect": 0,
                                "is_sound_enabled": true,
                                "is_bridge": false,
                                "can_change_archive_timetable": true,
                                "is_auto_create_streams": false,
                                "is_provisioning_enable": false,
                                "is_can_manage_archive_storage_days": true,
                                "is_editable": true,
                                "status_changed_at": "2023-04-21 19:03:08",
                                "is_intercom": false,
                                "deleted_at": ""
                            }
                        ],
                        "has_cameras": true,
                        "cameras_count": 2,
                        "intercoms_count": 0,
                        "is_house": 1,
                        "csa_id": 688647
                    }
                ],
                "has_cameras": true,
                "cameras_count": 2,
                "intercoms_count": 0,
                "is_house": 1,
                "csa_id": 688657
            }
        ],
        "full_pretty": null,
        "has_cameras": false,
        "cameras_count": 16083,
        "intercoms_count": 0,
        "is_house": 0,
        "csa_id": 17030
    }
]

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/cameras/search/tree' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "search": "string",
    "vendor_name": "string",
    "model_name": "string",
    "service": "string",
    "tags": "string",
    "is_intercom": "boolean"
}'
PHP
PHP
$data = array (
  'search' => 'string',
  'vendor_name' => 'string',
  'model_name' => 'string',
  'service' => 'string',
  'tags' => 'string',
  'is_intercom' => 'boolean',
);
$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/cameras/search/tree', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.