Skip to main content
Skip table of contents

List of events. Line crossing detection

Viewing a list of line crossing detection events.

GET/api/v1/analytic-case/{case}/line-intersection/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

Number of items per pagination page. Default is 25

camerasrequired

array

Array of camera IDs for which events will be displayed

daterequired

string

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

timezonerequired

string

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

fromrequired

string

Start date for filtering. This field is mandatory when there is no filtering based on the «date» field

torequired

string

End date for filtering. This field is mandatory when there is no filtering based on the «date» field

Response

200

Returns a list of analytics events on page i of the pagination

JSON
{
    "data": [
        {
            "camera": {
                "id": 746,
                "group_id": 98,
                "status": "active",
                "type": "media_server_v2",
                "start_at": "2022-03-23 15:19:43",
                "created_at": "2022-01-27 19:12:36",
                "billing_id": null,
                "pretty_name": "Camera 1",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "streams": [
                    {
                        "id": 735,
                        "type": "high",
                        "camera_id": 746,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": true,
                        "width": 1280,
                        "height": 960
                    },
                    {
                        "id": 736,
                        "type": "low",
                        "camera_id": 746,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": true,
                        "width": 1280,
                        "height": 960
                    }
                ],
                "has_sound": true,
                "is_archive_recording": true,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "Kitchen"
            },
            "created_at": "2022-04-07 15:18:38",
            "event": {
                "id": 28,
                "name": "line-intersection",
                "description": "Line crossing detection",
                "color": "#5CBCE7",
                "analytic_type": "line-intersection"
            }
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/analytic-case/936/motion-detect/history?per_page=24&page=1",
        "last": "https://vms.local/api/v1/analytic-case/936/motion-detect/history?per_page=24&page=35",
        "prev": null,
        "next": "https://vms.local/api/v1/analytic-case/936/motion-detect/history?per_page=24&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 35,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/v1/analytic-case/936/motion-detect/history?per_page=24&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://vms.local/api/v1/analytic-case/936/motion-detect/history?per_page=24&page=2",
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v1/analytic-case/936/motion-detect/history",
        "per_page": 24,
        "to": 24,
        "total": 827
    }
}
401

Authorization token is not provided or invalid, see Obtaining a token

422

Returns a JSON error object, 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}/line-intersection/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.