Skip to main content
Skip table of contents

View intercom events with face recognition

View intercom events with face recognition

/View intercom events using face recognition

GET /api/admin/v1/intercoms/{intercom}/analytic/events

Parameters

int intercom, Unique identifier of the intercom


int per_page, Number of elements in one pagination page.


string dir, In which direction to sort.


array analytic_group_ids, An array consisting of the ids of analytics groups by which events need to be filtered


array analytic_file_ids, An array consisting of the ids of analytics resources by which events need to be filtered


date from, Start date of the range that should include the date and time of events


date to, End date of the range that should include the date and time of events

200 OK

Successful response

JSON
{
    "data": [
        {
            "type": "face-recognition",
            "crop": "data:image/jpeg;base64",
            "created_at": "2023-02-07T19:34:14.000000Z",
            "uuid": "3ac8cd91-b5b3-4fbe-a201-d072bb0e0a01",
            "similarity": 0,
            "analytic_file": {
                "id": 1,
                "name": "new name 1",
                "type": "face_resource",
                "type_pretty": "Faces",
                "uuid": null,
                "body": null,
                "url": "https://vms.local:8000/storage/analytic-files/2023/7/26/TimFLIc38Tj4ehw4BTlEZqoXRJ2xeFBCoVHCQCqB.png",
                "created_at": null,
                "updated_at": "2023-07-26T14:59:57.000000Z"
            },
            "analytic_group": {
                "id": 1,
                "name": "Group 1",
                "type": "face_resource",
                "type_pretty": "Faces",
                "uuid": "11f9e9a1-9d40-4687-9373-0285433aa8a7",
                "created_at": "2023-07-18T16:44:48.000000Z",
                "updated_at": "2023-07-18T16:44:48.000000Z"
            },
            "event": {
                "id": 5,
                "name": "face-recognized",
                "description": "Person identified",
                "color": "#91D4E2",
                "analytic_type": "face-recognition"
            },
            "event_frame_url": "https://vms.local/store/0bb26aea-5165-11ee-868f-56f46f9243a9/20230912/99916a44-cf9a-49bc-99f3-f388dd6d0a45.jpg"
        }
    ],
    "links": {
        "first": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=1",
        "last": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=25",
        "prev": null,
        "next": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/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/admin/intercoms/1/analytic/events?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": null,
                "label": "...",
                "active": false
            },
            {
                "url": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=24",
                "label": "24",
                "active": false
            },
            {
                "url": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=25",
                "label": "25",
                "active": false
            },
            {
                "url": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events?page=2",
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://localhost:8080/api/v1/admin/intercoms/1/analytic/events",
        "per_page": 1,
        "to": 1,
        "total": 25
    }
}

400 Bad Request

If it was not possible to obtain a list of intercom events

401 Unauthorized

Authorization token not sent or not valid

422 Unprocessable Entity

Returns a JSON object with an error.

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms/{intercom}/analytic/events' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "per_page": 0,
    "dir": "string",
    "analytic_group_ids": [],
    "analytic_file_ids": [],
    "from": "date",
    "to": "date"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'per_page' => 0,
  'dir' => 'string',
  'analytic_group_ids' => 
  array (
  ),
  'analytic_file_ids' => 
  array (
  ),
  'from' => 'date',
  'to' => 'date',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/intercoms/{intercom}/analytic/events', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.