Skip to main content
Skip table of contents

Getting camera tree

Returns the camera tree with camera objects. For each request, it adds the «All cameras» folder, which contains all the collected cameras of the user in one folder.

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

searchrequired

string

Search by camera address and name

excluderequired

array

An array of camera IDs to exclude from the response

hide_allrequired

bool

If there is no search and exclude, and you send true, the response will not include the «All Cameras» folder

Response

200

Returns the JSON tree object

JSON
[
                {
                    "id": 1,
                    "name": "Cameras",
                    "children": [
                        {
                            "id": 2,
                            "name": "Cameras 2",
                            "children": [
                                {
                                    "id": 1,
                                    "name": "Camera 1",
                                    "status": "empty",
                                    "type": "without_server",
                                    "start_at": null,
                                    "group_id": 2,
                                    "top_group_id": 1,
                                    "order": 0,
                                    "created_at": "2023-01-24T10:36:08.000000Z",
                                    "updated_at": "2023-01-24T10:36:08.000000Z",
                                    "origin": null,
                                    "group_type": "public",
                                    "folder_id": null,
                                    "is_sensitive": 0,
                                    "is_public": 0,
                                    "count_issues": 0,
                                    "azimuth": null,
                                    "location": null,
                                    "is_user_owner": false,
                                    "pack_id": null,
                                    "source": "manual",
                                    "archive_storage_days": null,
                                    "is_archive_recording": false,
                                    "is_increased_reconnect": 0,
                                    "model_id": null,
                                    "is_sound_enabled": true,
                                    "is_need_replace": false,
                                    "ip": null,
                                    "path": [
                                        1,
                                        2
                                    ],
                                    "bridge_id": null,
                                    "uuid": null,
                                    "deleted_at": null,
                                    "archive_recording_type": "fulltime",
                                    "is_auto_create_streams": false,
                                    "host_id": null,
                                    "is_enabled": 1,
                                    "is_editable": true,
                                    "is_intercom": false,
                                    "status_changed_at": null,
                                    "services_list": {
                                    "ptz": false,
                                    "motion_detect": false
                                },
                                "services": []
                            },
                            {
                                    "id": 2,
                                    "name": "Camera 2",
                                    "status": "initial",
                                    "type": "media_server_v2",
                                    "start_at": null,
                                    "group_id": 2,
                                    "top_group_id": 1,
                                    "order": 0,
                                    "created_at": "2023-01-24T10:36:28.000000Z",
                                    "updated_at": "2023-01-24T10:36:40.000000Z",
                                    "origin": null,
                                    "group_type": "public",
                                    "folder_id": null,
                                    "is_sensitive": 0,
                                    "is_public": 0,
                                    "count_issues": 0,
                                    "azimuth": null,
                                    "location": null,
                                    "is_user_owner": false,
                                    "pack_id": null,
                                    "source": "manual",
                                    "archive_storage_days": null,
                                    "is_archive_recording": false,
                                    "is_increased_reconnect": 0,
                                    "model_id": null,
                                    "is_sound_enabled": true,
                                    "is_need_replace": false,
                                    "ip": "192.168.204.30",
                                    "path": [
                                        1,
                                        2
                                    ],
                                    "bridge_id": null,
                                    "uuid": null,
                                    "deleted_at": null,
                                    "archive_recording_type": "fulltime",
                                    "is_auto_create_streams": false,
                                    "host_id": null,
                                    "is_enabled": 1,
                                    "is_editable": true,
                                    "is_intercom": false,
                                    "status_changed_at": null,
                                    "services_list": {
                                    "ptz": false,
                                    "motion_detect": false
                                },
                                "services": []
                            },
                            {
                                    "id": 3,
                                    "name": "Camera 3",
                                    "status": "initial",
                                    "type": "media_server_v2",
                                    "start_at": null,
                                    "group_id": 2,
                                    "top_group_id": 1,
                                    "order": 0,
                                    "created_at": "2023-01-24T10:36:40.000000Z",
                                    "updated_at": "2023-01-24T10:36:45.000000Z",
                                    "origin": null,
                                    "group_type": "public",
                                    "folder_id": null,
                                    "is_sensitive": 0,
                                    "is_public": 0,
                                    "count_issues": 0,
                                    "azimuth": null,
                                    "location": null,
                                    "is_user_owner": false,
                                    "pack_id": null,
                                    "source": "manual",
                                    "archive_storage_days": null,
                                    "is_archive_recording": false,
                                    "is_increased_reconnect": 0,
                                    "model_id": null,
                                    "is_sound_enabled": true,
                                    "is_need_replace": false,
                                    "ip": "192.168.204.30",
                                    "path": [
                                        1,
                                        2
                                    ],
                                    "bridge_id": null,
                                    "uuid": null,
                                    "deleted_at": null,
                                    "archive_recording_type": "fulltime",
                                    "is_auto_create_streams": false,
                                    "host_id": null,
                                    "is_enabled": 1,
                                    "is_editable": true,
                                    "is_intercom": false,
                                    "status_changed_at": null,
                                    "services_list": {
                                    "ptz": false,
                                    "motion_detect": false
                                    },
                                "services": []
                            },
                            {
                                "id": 4,
                                "name": "Camera 4",
                                "status": "empty",
                                "type": "without_server",
                                "start_at": null,
                                "group_id": 2,
                                "top_group_id": 1,
                                "order": 0,
                                "created_at": "2023-01-24T10:36:55.000000Z",
                                "updated_at": "2023-01-24T10:36:55.000000Z",
                                "origin": null,
                                "group_type": "public",
                                "folder_id": null,
                                "is_sensitive": 0,
                                "is_public": 0,
                                "count_issues": 0,
                                "azimuth": null,
                                "location": null,
                                "is_user_owner": false,
                                "pack_id": null,
                                "source": "manual",
                                "archive_storage_days": null,
                                "is_archive_recording": false,
                                "is_increased_reconnect": 0,
                                "model_id": null,
                                "is_sound_enabled": true,
                                "is_need_replace": false,
                                "ip": null,
                                "path": [
                                    1,
                                    2
                                ],
                                "bridge_id": null,
                                "uuid": null,
                                "deleted_at": null,
                                "archive_recording_type": "fulltime",
                                "is_auto_create_streams": false,
                                "host_id": null,
                                "is_enabled": 1,
                                "is_editable": true,
                                "is_intercom": false,
                                "status_changed_at": null,
                                "services_list": {
                                "ptz": false,
                                "motion_detect": false
                                },
                            "services": []
                            },
                            {
                                "id": 5,
                                "name": "Camera 5",
                                "status": "empty",
                                "type": "without_server",
                                "start_at": null,
                                "group_id": 2,
                                "top_group_id": 1,
                                "order": 0,
                                "created_at": "2023-01-24T10:37:16.000000Z",
                                "updated_at": "2023-01-24T10:37:16.000000Z",
                                "origin": null,
                                "group_type": "public",
                                "folder_id": null,
                                "is_sensitive": 0,
                                "is_public": 0,
                                "count_issues": 0,
                                "azimuth": null,
                                "location": null,
                                "is_user_owner": false,
                                "pack_id": null,
                                "source": "manual",
                                "archive_storage_days": null,
                                "is_archive_recording": false,
                                "is_increased_reconnect": 0,
                                "model_id": null,
                                "is_sound_enabled": true,
                                "is_need_replace": false,
                                "ip": null,
                                "path": [
                                    1,
                                    2
                                ],
                                "bridge_id": null,
                                "uuid": null,
                                "deleted_at": null,
                                "archive_recording_type": "fulltime",
                                "is_auto_create_streams": false,
                                "host_id": null,
                                "is_enabled": 1,
                                "is_editable": true,
                                "is_intercom": false,
                                "status_changed_at": null,
                                "services_list": {
                                "ptz": false,
                                "motion_detect": false
                                },
                            "services": []
                            }
                        ]
                    }
                ]
                }
            ]
401

Authorization token not provided or invalid, see Obtaining a token

422

Returns a JSON object with an error, see Validation

JSON
{
    "message": "There won't be any informative message here",
    "errors": {
        "any_key": [
            "Here the error cause will be described"
        ]
    }
}

Example

JSON
curl -k --location --request GET 'https://vms.local/api/v1/cameras/tree?search=string&exclude=array&hide_all=bool' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

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

If this problem persists, please contact our support.