Skip to main content
Skip table of contents

Configure intercom settings with face recognition

Configure intercom settings with face recognition

Setting up analytics on the intercom

JSON
{
    "threshold": 10,
    "analytic_groups": [
        1,
        2
    ]
}

POST /api/admin/v1/intercoms/{intercom}/analytic

Parameters

int intercom, Unique identifier of the intercom


string threshold, Name of the resource


string analytic_groups, Resource name

200 OK

Successful response

JSON
{
    "id": 15,
    "title": "intercom",
    "type": "face-recognition",
    "type_pretty": "Face Recognition",
    "cameras": [
        {
            "id": 1,
            "group_id": 1,
            "status": "initial",
            "type": "mse",
            "pretty_text": null,
            "short_pretty": null,
            "start_at": null,
            "created_at": "2023-08-25T10:36:12.000000Z",
            "name": "fake stream 1",
            "can_edit": true,
            "origin": null,
            "group_type": "public",
            "shared_from": null,
            "ip": "123.1.1.1",
            "lat": null,
            "lng": null,
            "azimuth": null,
            "is_sensitive": false,
            "is_buffer_enabled": false,
            "is_public": 0,
            "archive_ranges": null,
            "archive_recording_timetable": null,
            "motion_detaction_timetable": [],
            "onvif_configuration": null,
            "streams_rtsp": null,
            "can_change_archive_timetable": true,
            "is_can_manage_archive_storage_days": true,
            "is_ip_reserved": false,
            "count_issues": 0,
            "source": "manual",
            "archive_storage_days": 15,
            "is_archive_recording": true,
            "archive_recording_type": "fulltime",
            "is_increased_reconnect": 0,
            "is_sound_enabled": true,
            "profile": null,
            "is_bridge": true,
            "is_auto_create_streams": false,
            "is_provisioning_enable": false,
            "is_can_manage_streams": true,
            "streams_source": "manual",
            "is_editable": true,
            "status_changed_at": null,
            "is_intercom": false,
            "deleted_at": null,
            "is_need_replace": false,
            "meta": {
                "threshold": 80
            },
            "analytic_case_camera_status": "active",
            "analytic_case_camera_status_pretty": "Video stream active",
            "analytic_case_camera_user_status": null,
            "analytic_case_camera_user_status_pretty": null
        }
    ],
    "errors": [
        "Error updating analytics on camera."
    ]
}

400 Bad Request

If it was not possible to configure analytics for the intercom

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' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "threshold": "string",
    "analytic_groups": "string"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'threshold' => 'string',
  'analytic_groups' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'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', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.