Skip to main content
Skip table of contents

Список групп

Ответы отличаются в зависимости от клиентов. Для толстых клиентов ответы не пагинированные и берутся первые 100 групп. Для всех остальных список пагинированный

GET/api/v1/groups

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

per_pagerequired

int

Количество элементов в одной странице пагинации. По умолчанию 25 штук

pagerequired

int

Номер страницы пагинации

exclude_for_userrequired

int

Id суб-пользователя, чьи расшаренные группы нужно исключить из респонса

searchrequired

string

Поиск по имени группы

Response

200

Успешный ответ

JSON
{
    "data": [
        {
            "id": 8,
            "name": "3",
            "items": [
                {
                    "id": 1,
                    "group_id": 2,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-06 20:20:50",
                    "billing_id": null,
                    "pretty_name": "Камера 1",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 2,
                            "type": "low",
                            "camera_id": 1,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 1"
                },
                {
                    "id": 2,
                    "group_id": 2,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-06 20:20:50",
                    "billing_id": null,
                    "pretty_name": "Камера 2",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 3,
                            "type": "high",
                            "camera_id": 2,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 4,
                            "type": "low",
                            "camera_id": 2,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 2"
                },
                {
                    "id": 3,
                    "group_id": 5,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-06 20:20:50",
                    "billing_id": null,
                    "pretty_name": "Камера 3",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 5,
                            "type": "high",
                            "camera_id": 3,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 6,
                            "type": "low",
                            "camera_id": 3,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 3"
                },
                {
                    "id": 6,
                    "group_id": 2,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-16 10:25:53",
                    "billing_id": null,
                    "pretty_name": "Камера 1",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 11,
                            "type": "high",
                            "camera_id": 6,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 12,
                            "type": "low",
                            "camera_id": 6,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 1"
                },
                {
                    "id": 8,
                    "group_id": 2,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-16 10:25:54",
                    "billing_id": null,
                    "pretty_name": "Камера 3",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 15,
                            "type": "high",
                            "camera_id": 8,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 16,
                            "type": "low",
                            "camera_id": 8,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 3"
                },
                {
                    "id": 9,
                    "group_id": 2,
                    "status": "partial",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-16 10:25:54",
                    "billing_id": null,
                    "pretty_name": "Камера 4",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 17,
                            "type": "high",
                            "camera_id": 9,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 18,
                            "type": "low",
                            "camera_id": 9,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 4"
                },
                {
                    "id": 10,
                    "group_id": 2,
                    "status": "active",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-16 10:25:55",
                    "billing_id": null,
                    "pretty_name": "Камера 5",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 19,
                            "type": "high",
                            "camera_id": 10,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 20,
                            "type": "low",
                            "camera_id": 10,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 5"
                },
                {
                    "id": 11,
                    "group_id": 2,
                    "status": "active",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-21 14:49:00",
                    "billing_id": null,
                    "pretty_name": "Камера 6",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 22,
                            "type": "high",
                            "camera_id": 11,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 25,
                            "type": "low",
                            "camera_id": 11,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": null,
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": true
                    },
                    "has_sound": false,
                    "is_archive_recording": true,
                    "archive_recording_type": "timetable",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 6"
                }
            ],
            "items_count": 8,
            "previews": [
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 1
                },
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 2
                },
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 3
                },
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 6
                }
            ]
        },
        {
            "id": 7,
            "name": "2",
            "items": [
                {
                    "id": 1,
                    "group_id": 2,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-06 20:20:50",
                    "billing_id": null,
                    "pretty_name": "Камера 1",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 2,
                            "type": "low",
                            "camera_id": 1,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 1"
                }
            ],
            "items_count": 1,
            "previews": [
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 1
                }
            ]
        },
        {
            "id": 6,
            "name": "1",
            "items": [
                {
                    "id": 2,
                    "group_id": 2,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-06 20:20:50",
                    "billing_id": null,
                    "pretty_name": "Камера 2",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 3,
                            "type": "high",
                            "camera_id": 2,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        },
                        {
                            "id": 4,
                            "type": "low",
                            "camera_id": 2,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": false,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 2"
                },
                {
                    "id": 4,
                    "group_id": 5,
                    "status": "inactive",
                    "type": "media_server_v2",
                    "start_at": "",
                    "created_at": "2022-12-06 20:20:51",
                    "billing_id": null,
                    "pretty_name": "Камера 4",
                    "pretty_text": "Камеры",
                    "short_address": "Камеры",
                    "full_address": "Камеры",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "streams": [
                        {
                            "id": 7,
                            "type": "high",
                            "camera_id": 4,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": true,
                            "width": 1280,
                            "height": 960
                        },
                        {
                            "id": 8,
                            "type": "low",
                            "camera_id": 4,
                            "is_preview_from_server": true,
                            "is_archive_from_server": null,
                            "status": "active",
                            "has_sound": false,
                            "width": null,
                            "height": null
                        }
                    ],
                    "services": {
                        "ptz": false,
                        "motion_detect": false
                    },
                    "has_sound": true,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "can_change_archive_timetable": false,
                    "is_bridge": false,
                    "is_favorite": false,
                    "user_status": "active",
                    "name": "Камера 4"
                }
            ],
            "items_count": 2,
            "previews": [
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 2
                },
                {
                    "preview": "https://host-name-3.vms.local:8443/live/a4967207-eb49-4275-b73e-91e771675ac0/preview.mp4?token=token",
                    "status": null,
                    "camera_id": 4
                }
            ]
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8080/api/v1/groups?page=1",
        "last": "http://127.0.0.1:8080/api/v1/groups?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "http://127.0.0.1:8080/api/v1/groups?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8080/api/v1/groups",
        "per_page": 25,
        "to": 3,
        "total": 3
    }
}
401

Токен авторизации не передан или не валидный, см. Получение токена

422

Возвращает JSON объект с ошибкой, см. Валидация

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/v1/groups?per_page=int&page=int&exclude_for_user=int&search=string' \
--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.