Skip to main content
Skip table of contents

List of all analytics events

Paginated list of all analytics events available to the user.

GET/api/v1/analytic-case/events

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

camerasrequired

array

Array of camera IDs for which events will be displayed

fromrequired

string

Starting date for filtering events

torequired

string

Ending date for filtering events

eventsrequired

array

Array of values for filtering by analytics events

analytic_typesrequired

array

Array of values for filtering by analytics case type

idsrequired

array

Array of analytics case IDs for filtering

daterequired

string

Template for filtering by date

timezonerequired

string

Timezone for date filtering template. Example: Europe/Paris. This field is required when filtering by the «date» field

dirrequired

string

Sorting direction for date. «desc» - from larger to smaller, «asc» - from smaller to larger

similarity_fromrequired

int

Similarity percentage for filtering, starting from which filtering will be applied

similarity_torequired

int

Similarity percentage for filtering, up to which filtering will be applied

Response

200

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

JSON
{
                "data": [
                    {
                        "type": "face",
                        "crop": "data:image/jpeg;base64",
                        "created_at": "2023-02-07T19:34:14.000000Z",
                        "rect": null,
                        "uuid": "3ac8cd91-b5b3-4fbe-a201-d072bb0e0a01",
                        "similarity": 0,
                        "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": "Folder, Camera name",
                            "lat": null,
                            "lng": null,
                            "azimuth": null,
                            "has_sound": false,
                            "is_archive_recording": true,
                            "is_bridge": false,
                            "is_favorite": false,
                            "user_status": "active",
                            "name": "Camera name"
                        },
                        "analytic_file": null,
                        "analytic_group": null,
                        "analytic_case": {
                            "id": 2,
                            "title": "asad",
                            "type": "face",
                            "type_pretty": "Face recognition",
                            "status": "active",
                            "created_at": "2023-02-03T10:51:53.000000Z",
                            "updated_at": "2023-01-26T07:56:47.000000Z",
                            "color": "#E5642E",
                            "available_events": [],
                            "is_fails_exists": false
                        },
                        "event": {
                            "id": 5,
                            "name": "unrecognized-face",
                            "description": "Face not identified",
                            "color": "#91D4E2",
                            "analytic_type": "face"
                        }
                    }
                ],
            "links": {
                "first": "http://localhost:8080/api/v1/analytic-case/events?page=1",
                "last": "http://localhost:8080/api/v1/analytic-case/events?page=25",
                "prev": null,
                "next": "http://localhost:8080/api/v1/analytic-case/events?page=2"
            },
            "meta": {
                "current_page": 1,
                "from": 1,
                "last_page": 25,
                "links": [
                        {
                            "url": null,
                            "label": "pagination.previous",
                            "active": false
                        },
                        {
                            "url": "http://localhost:8080/api/v1/analytic-case/events?page=1",
                            "label": "1",
                            "active": true
                        },
                        {
                            "url": "http://localhost:8080/api/v1/analytic-case/events?page=2",
                            "label": "2",
                            "active": false
                        },
                        {
                            "url": "http://localhost:8080/api/v1/analytic-case/events?page=3",
                            "label": "3",
                            "active": false
                        },
                        {
                            "url": null,
                            "label": "...",
                            "active": false
                        },
                        {
                            "url": "http://localhost:8080/api/v1/analytic-case/events?page=24",
                            "label": "24",
                            "active": false
                        },
                        {
                            "url": "http://localhost:8080/api/v1/analytic-case/events?page=25",
                            "label": "25",
                            "active": false
                        },
                        {
                            "url": "http://localhost:8080/api/v1/analytic-case/events?page=2",
                            "label": "pagination.next",
                            "active": false
                        }
                    ],
                "path": "http://localhost:8080/api/v1/analytic-case/events",
                "per_page": 1,
                "to": 1,
                "total": 25
                }
            }
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/events?per_page=int&cameras=array&from=string&to=string&events=array&analytic_types=array&ids=array&date=string&timezone=string&dir=string&similarity_from=int&similarity_to=int' \
--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.