Skip to main content
Skip table of contents

List of all analytics cases

Paginated list of all analytics cases available to the user

GET/api/v1/analytic-case

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

Number of items per pagination page. Default is 25

pagerequired

int

Pagination page number

searchrequired

int

Search by name or analytics case title

typesrequired

array

Search by analytics case type

Response

200

Returns a list of analytics cases on page i of pagination

JSON
{
                "id": 2,
                "title": "asad",
                "type": "face",
                "type_pretty": "Face recognition",
                "status": "active",
                "cameras": [
                    {
                        "id": 1,
                        "group_id": 2,
                        "status": "empty",
                        "type": "without_server",
                        "start_at": null,
                        "created_at": "2023-01-24T10:36:08.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": 1,
                                "type": "high",
                                "camera_id": 1,
                                "is_preview_from_server": true,
                                "is_archive_from_server": null,
                                "status": null,
                                "has_sound": false,
                                "width": null,
                                "height": null
                            },
                            {
                                "id": 2,
                                "type": "low",
                                "camera_id": 1,
                                "is_preview_from_server": true,
                                "is_archive_from_server": null,
                                "status": null,
                                "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": 1,
                                "title": null,
                                "schedule": 3,
                                "timetable": null,
                                "status": null,
                                "created_at": null,
                                "updated_at": null,
                                "users": [],
                                "event": {
                                    "id": 5,
                                    "name": "unrecognized-face",
                                    "description": "Face not identified",
                                    "color": "#91D4E2",
                                    "analytic_type": "face"
                                },
                        "analytic_groups": [
                            {
                                "id": 1,
                                "name": "test",
                                "type": "cameras",
                                "type_pretty": "models.analytic_files.description.cameras",
                                "uuid": "de843c6a-cf88-4119-b117-e0e8971947f5",
                                "created_at": null,
                                "updated_at": null
                            }
                        ],
                        "extra": null
                    }
                ],
                "meta": null,
                "analytic_case_camera_status": null,
                "analytic_case_camera_status_pretty": null,
                "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-03T10:51:53.000000Z",
            "updated_at": "2023-01-26T07:56:47.000000Z",
            "analytic_files": [],
            "color": "#E5642E",
            "available_events": [
                    {
                        "id": 5,
                        "type": "camera",
                        "type_pretty": "Face not identified",
                        "data": null,
                        "created_at": "2023-01-24T10:35:22.000000Z",
                        "updated_at": "2023-01-24T10:35:22.000000Z"
                    }
                ],
            "is_fails_exists": false
            }
401

Authorization token is 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?per_page=int&page=int&search=int&types=array' \
--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.