Skip to main content
Skip table of contents

View analytics case

View analytics case.

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

Unique identifier of the analytics case

Response

200

Returns the analytics case

JSON
{
    "id": 22,
    "title": "Motion detection",
    "type": "motion-detect",
    "type_pretty": "Motion detection",
    "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": "Camera 1",
            "pretty_text": "Cameras",
            "short_address": "Cameras",
            "full_address": "Cameras",
            "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": "Set a label",
                    "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": "Motion detection",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                },
                {
                    "id": 1,
                    "title": "Set a label",
                    "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": "Motion detection",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                }
            ],
            "meta": {
                "figure": [
                    {
                        "x": 0.140625,
                        "y": 0.28888888888888886
                    },
                    {
                        "x": 0.3453125,
                        "y": 0.9527777777777776
                    },
                    {
                        "x": 0.921875,
                        "y": 0.9444444444444444
                    },
                    {
                        "x": 0.89375,
                        "y": 0.16111111111111112
                    }
                ],
                "threshold": 12
            },
            "analytic_case_camera_status": "active",
            "analytic_case_camera_status_pretty": "Camera active",
            "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": "Camera 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": "Camera 1",
            "pretty_text": "Cameras",
            "short_address": "Cameras",
            "full_address": "Cameras",
            "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": "Set a label",
                    "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": "Motion detection",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                },
                {
                    "id": 1,
                    "title": "Set a label",
                    "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": "Motion detection",
                        "color": "#5AD057",
                        "analytic_type": "motion-detect"
                    },
                    "extra": null
                }
            ],
            "meta": {
                "figure": [
                    {
                        "x": 0.140625,
                        "y": 0.28888888888888886
                    },
                    {
                        "x": 0.3453125,
                        "y": 0.9527777777777776
                    },
                    {
                        "x": 0.921875,
                        "y": 0.9444444444444444
                    },
                    {
                        "x": 0.89375,
                        "y": 0.16111111111111112
                    }
                ],
                "threshold": 12
            },
            "analytic_case_camera_status": "active",
            "analytic_case_camera_status_pretty": "Camera active",
            "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": "Camera 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": "Motion detection",
            "color": "#5AD057",
            "analytic_type": "motion-detect"
        }
    ],
    "is_fails_exists": false
}
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/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.