Skip to main content
Skip table of contents

Просмотр кейса аналитики

Просмотр кейса Аналитики.

GET/api/v1/analytic-case/{case}

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

caseoptional

int

Уникальный идентификатор кейса аналитики

Response

200

Возвращает кейс аналитики

JSON
{
    "id": 22,
    "title": "Детекция вторжения в зону",
    "type": "motion-detect",
    "type_pretty": "Детекция вторжения в зону",
    "status": "active",
    "cameras": [
        {
            "id": 3,
            "group_id": 2,
            "status": "active",
            "type": "media_server_v2",
            "start_at": null,
            "created_at": "2023-02-03T08:29:06.000000Z",
            "billing_id": null,
            "pretty_name": "Камера 1",
            "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
                }
            ],
            "has_sound": false,
            "archive_ranges": [],
            "archive_recording_timetable": null,
            "is_archive_recording": false,
            "archive_recording_type": "fulltime",
            "can_change_archive_timetable": false,
            "scripts": [
                {
                    "id": 3,
                    "title": "Установить метку",
                    "schedule": [],
                    "timetable": {
                        "days": [
                            {
                                "to": "23:59:00+03:00",
                                "from": "00:00:00+03:00",
                                "type": "same_every_day",
                                "breaks": []
                            }
                        ],
                        "intervals": []
                    },
                    "status": "active",
                    "created_at": "2023-02-15T09:03:48.000000Z",
                    "updated_at": "2023-02-15T09:03:48.000000Z",
                    "users": [
                        {
                            "id": 7,
                            "login": "user@mail.com",
                            "name": "user",
                            "parent_id": 3,
                            "created_at": "2023-02-03T08:29:07.000000Z",
                            "updated_at": "2023-02-28T07:11:45.000000Z",
                            "access_token_id": null,
                            "can_update_password": true
                        }
                    ],
                    "event": {
                        "id": 2,
                        "name": "motion-detect",
                        "description": "Детекция вторжения в зону",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                },
                {
                    "id": 1,
                    "title": "Установить метку",
                    "schedule": [],
                    "timetable": {
                        "days": [
                            {
                                "to": "23:59:00+03:00",
                                "from": "00:00:00+03:00",
                                "type": "same_every_day",
                                "breaks": []
                            }
                        ],
                        "intervals": []
                    },
                    "status": "active",
                    "created_at": "2023-02-13T15:55:36.000000Z",
                    "updated_at": "2023-02-13T15:55:36.000000Z",
                    "users": [
                        {
                            "id": 7,
                            "login": "user@mail.com",
                            "name": "user",
                            "parent_id": 3,
                            "created_at": "2023-02-03T08:29:07.000000Z",
                            "updated_at": "2023-02-28T07:11:45.000000Z",
                            "access_token_id": null,
                            "can_update_password": true
                        }
                    ],
                    "event": {
                        "id": 2,
                        "name": "motion-detect",
                        "description": "Детекция вторжения в зону",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                }
            ],
            "meta": {
                "figures": [
                    {
                        "name": "Figure 1",
                        "coords": [
                            {
                                "x": 0.153125,
                                "y": 0.31666666666666665
                            },
                            {
                                "x": 0.3421875,
                                "y": 0.7361111111111112
                            },
                            {
                                "x": 0.86875,
                                "y": 0.6472222222222223
                            },
                            {
                                "x": 0.78125,
                                "y": 0.125
                            }
                        ]
                    }
                ],
                "threshold": 12
            },
            "analytic_case_camera_status": "active",
            "analytic_case_camera_status_pretty": "Камера активна",
            "analytic_case_camera_user_status": null,
            "analytic_case_camera_user_status_pretty": null,
            "event": null,
            "is_bridge": false,
            "is_favorite": false,
            "user_status": "active",
            "name": "Камера 1"
        }
    ],
    "available_cameras": [
        {
            "id": 3,
            "group_id": 2,
            "status": "active",
            "type": "media_server_v2",
            "start_at": null,
            "created_at": "2023-02-03T08:29:06.000000Z",
            "billing_id": null,
            "pretty_name": "Камера 1",
            "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,
            "archive_ranges": [],
            "archive_recording_timetable": null,
            "is_archive_recording": false,
            "archive_recording_type": "fulltime",
            "can_change_archive_timetable": false,
            "scripts": [
                {
                    "id": 3,
                    "title": "Установить метку",
                    "schedule": [],
                    "timetable": {
                        "days": [
                            {
                                "to": "23:59:00+03:00",
                                "from": "00:00:00+03:00",
                                "type": "same_every_day",
                                "breaks": []
                            }
                        ],
                        "intervals": []
                    },
                    "status": "active",
                    "created_at": "2023-02-15T09:03:48.000000Z",
                    "updated_at": "2023-02-15T09:03:48.000000Z",
                    "users": [
                        {
                            "id": 7,
                            "login": "user@mail.com",
                            "name": "user",
                            "parent_id": 3,
                            "created_at": "2023-02-03T08:29:07.000000Z",
                            "updated_at": "2023-02-28T07:11:45.000000Z",
                            "access_token_id": null,
                            "can_update_password": true
                        }
                    ],
                    "event": {
                        "id": 2,
                        "name": "motion-detect",
                        "description": "Детекция вторжения в зону",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                },
                {
                    "id": 1,
                    "title": "Установить метку",
                    "schedule": [],
                    "timetable": {
                        "days": [
                            {
                                "to": "23:59:00+03:00",
                                "from": "00:00:00+03:00",
                                "type": "same_every_day",
                                "breaks": []
                            }
                        ],
                        "intervals": []
                    },
                    "status": "active",
                    "created_at": "2023-02-13T15:55:36.000000Z",
                    "updated_at": "2023-02-13T15:55:36.000000Z",
                    "users": [
                        {
                            "id": 7,
                            "login": "user@mail.com",
                            "name": "user",
                            "parent_id": 3,
                            "created_at": "2023-02-03T08:29:07.000000Z",
                            "updated_at": "2023-02-28T07:11:45.000000Z",
                            "access_token_id": null,
                            "can_update_password": true
                        }
                    ],
                    "event": {
                        "id": 2,
                        "name": "motion-detect",
                        "description": "Детекция вторжения в зону",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                }
            ],
            "meta": {
                "figures": [
                    {
                        "name": "Figure 1",
                        "coords": [
                            {
                                "x": 0.153125,
                                "y": 0.31666666666666665
                            },
                            {
                                "x": 0.3421875,
                                "y": 0.7361111111111112
                            },
                            {
                                "x": 0.86875,
                                "y": 0.6472222222222223
                            },
                            {
                                "x": 0.78125,
                                "y": 0.125
                            }
                        ]
                    }
                ],
                "threshold": 12
            },
            "analytic_case_camera_status": "active",
            "analytic_case_camera_status_pretty": "Камера активна",
            "analytic_case_camera_user_status": null,
            "analytic_case_camera_user_status_pretty": null,
            "event": null,
            "is_bridge": false,
            "is_favorite": false,
            "user_status": "active",
            "name": "Камера 1"
        }
    ],
    "created_at": "2023-02-28T07:11:52.000000Z",
    "updated_at": "2023-02-28T07:11:52.000000Z",
    "color": "#2CA329",
    "available_events": [
        {
            "id": 2,
            "name": "motion-detect",
            "description": "Детекция вторжения в зону",
            "color": "#5AD057",
            "analytic_type": "motion-detect"
        }
    ],
    "is_fails_exists": false
}

array available_events, массив событий, по которым доступна фильтрация в списке событий. Будет доступно только для кейсов аналитики с типом «Распознавание лиц» и «Распознавание номерных знаков». В массиве может быть или 2 события, или ни одного

array cameras, массив всех камер, который относятся к кейсу

array available_cameras, массив камер кейса, доступных для редактирования

401

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

422

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

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

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/v1/analytic-case/{case}' \
--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.