Skip to end of metadata
Go to start of metadata

Main functions

The script remembers the last event from Face Recognizer and, according to the configured parameters, sends the received data by POST request to the url specified in the script settings.

The script also has the ability to enable the API to get an image from the track GUID.

Installation

  • Go to automation, click "Download example" and select "From file", specifying the path to the script.
  • Uncheck "Enable script" and click save.
  • Perform the configuration and click "Save and run".

Settings


Enable get track image API - 
When enabled, it allows you to get an image by the track GUID, according to the following request:

https://server_ip:sdk_port/s/fr/track?guid=track_guid
  • server_ip - IP server address
  • sdk_port - port SDK
  • track_guid - GUID of track


Enable resend post JSON data - When enabled, it forwards the received data with a POST request to the specified URL.
Store - 
The string that is passed in the request.
Enter channels, Exit channels, Passby channels - 
The channels that the script works with, depending on which field the channel is selected, depends on the type of request.
Key -
 the key for generating the signature (sign).
Host - 
The URL to which the POST request is sent.
Enable sign - 
If enabled, generates a signature (sign), if disabled, sign = ".

Local host - 
IP or domain name of the server on which the script is running. (Required to generate the URL before the image in headimgurl)
Debug mode -
Advanced logging mode of the script.

 Example of data that is sent by a POST request
{
'type': ev.type, 
'faceinfo': {
'remark': "remark", 
'face_id': 'oENZdDIV', 
'headimgurl': 'https://localhost:8080/s/fr/track?guid=oENZdDIV', 
'age': 0, 'sex': 'male'}, 
'sign': Key, 
'time': 1623310542449L, 
'data': {
'channel': {'guid': channel.guid, 'name': channel.name}, 
'server': {'guid': server.guid, 'name': server.name}
},
 'store': store
}

type - Type of event.

remark - Comment on a person in the person database.

face_id - The unique identifier of the person.

headimgurl - URL link to the recognized face. (If the corresponding parameter is enabled)

age, sex - age, sex

sign - Signature from the "Key" parameter.

time - Unix-face detection time.

channel - Channel GUID, channel name.

server - Server GUID, server name.

store - The value from the "Store" parameter.

Download

  • No labels