Skip to main content
Skip table of contents

List of events. Face recognition

Viewing the list of face recognition events.

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

camerasrequired

array

Array of camera IDs for which events will be displayed

filesrequired

array

Array of resource IDs owned by the user for which events will be displayed

groupsrequired

array

Array of resource group IDs owned by the user for which events will be displayed

daterequired

string

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

timezonerequired

string

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

fromrequired

string

Starting date for filtering. This field is mandatory when there is no filtering by the «date» field

torequired

string

Ending date for filtering. This field is mandatory when there is no filtering by the «date» field

eventsrequired

array

Array of event IDs for filtering

similarity_fromrequired

int

Similarity percentage threshold for filtering events (minimum threshold)

similarity_torequired

int

Similarity percentage threshold for filtering events (maximum threshold)

Response

200

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

JSON
{
    "data": [
        {
            "crop": [
                ""
            ],
            "created_at": "2022-04-06 17:30:02",
            "rect": [
                [
                    744,
                    108,
                    40,
                    51
                ]
            ],
            "camera": {
                "id": 747,
                "group_id": 98,
                "status": "active",
                "type": "media_server_v2",
                "start_at": "2022-03-23 10:33:15",
                "created_at": "2022-01-27 19:13:18",
                "billing_id": null,
                "pretty_name": "Camera 1",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "streams": [
                    {
                        "id": 737,
                        "type": "high",
                        "camera_id": 747,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": false,
                        "width": 1280,
                        "height": 960
                    },
                    {
                        "id": 738,
                        "type": "low",
                        "camera_id": 747,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": false,
                        "width": 1280,
                        "height": 960
                    }
                ],
                "has_sound": false,
                "is_archive_recording": true,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "Camera 1"
            },
            "analytic_group": {
                "id": 14,
                "name": "1",
                "type": "face_resource",
                "type_pretty": "Faces",
                "uuid": "2d951b2e-a92a-11ec-8995-a3b0e5228375",
                "created_at": "2022-03-21 18:18:36",
                "updated_at": "2022-03-21 18:18:36"
            },
            "analytic_file": {
                "id": 53,
                "name": "name.jpeg",
                "type": "face_resource",
                "type_pretty": "Faces",
                "uuid": null,
                "body": "",
                "url": "https://vms.local/storage/analytic-files/2022/3/21/WMUZQieuxkC1zm4XHVpTwRO3rd2ais1JLcMqzWJt.jpg",
                "created_at": "2022-03-21 18:18:33",
                "updated_at": "2022-03-21 18:18:33"
            },
            "similarity": 11,
            "event": {
                "id": 18,
                "name": "recognized-face",
                "description": "Face identified",
                "color": "#07D4F0",
                "analytic_type": "face"
            },
            "uuid": "e46844c5-24b1-433e-9031-e69b5f87a8b1",
            "is_can_open": true
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/analytic-case/945/face/history?per_page=24&page=1",
        "last": "https://vms.local/api/v1/analytic-case/945/face/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/945/face/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/945/face/history",
        "per_page": 24,
        "to": 1,
        "total": 1
    }
}
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}/face/history?per_page=int&cameras=array&files=array&groups=array&date=string&timezone=string&from=string&to=string&events=array&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.