Skip to main content
Skip table of contents

List of events. Damage detection

Viewing the list of damage detection events.

GET/api/v1/analytic-case/{case}/camera-obstacle/history

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

per_pagerequired

int

The number of items per pagination page. Default is 25 items

camerasrequired

array

Array of camera ID's for which events will be displayed

daterequired

string

Template for filtering by date. This field is mandatory when there is no filtering by the «from» and «to» fields

timezonerequired

string

Time zone for the date filtering template. Example - Europe/Paris. This field is mandatory when filtering by date

fromrequired

string

The date from which filtering will be performed. This field is mandatory when there is no filtering by the «date» field

torequired

string

The date until which filtering will be performed. This field is mandatory when there is no filtering by the «date» field

Response

200

Returns the list of analytics events on the i-th pagination page

JSON
{
    "data": [
        {
            "camera": {
                "id": 745,
                "group_id": 98,
                "status": "active",
                "type": "media_server_v2",
                "start_at": "2022-03-23 14:43:21",
                "created_at": "2022-01-27 18:55:48",
                "billing_id": null,
                "pretty_name": "Camera 1",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "streams": [
                    {
                        "id": 733,
                        "type": "high",
                        "camera_id": 745,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": false,
                        "width": 1920,
                        "height": 1080
                    },
                    {
                        "id": 734,
                        "type": "low",
                        "camera_id": 745,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": false,
                        "width": 640,
                        "height": 480
                    }
                ],
                "has_sound": false,
                "is_archive_recording": true,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "Ladder, 1st floor"
            },
            "created_at": "2022-04-07 12:06:20",
            "event": {
                "id": 33,
                "name": "camera-obstacle",
                "description": "Camera damage / obstruction / vandalism detection",
                "color": "#2542DF",
                "analytic_type": "camera-obstacle"
            }
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/analytic-case/974/camera-obstacle/history?per_page=24&page=1",
        "last": "https://vms.local/api/v1/analytic-case/974/camera-obstacle/history?per_page=24&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/v1/analytic-case/974/camera-obstacle/history?per_page=24&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v1/analytic-case/974/camera-obstacle/history",
        "per_page": 24,
        "to": 1,
        "total": 1
    }
}
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/{case}/camera-obstacle/history?per_page=int&cameras=array&date=string&timezone=string&from=string&to=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.