Database description 
All the data of the timestamp type is stored in the RFC 3339 format. 
The time used for storing data in the database can be set in the configuration file for each service in the   STORAGE_TIME parameter.  You can select LOCAL or UTC storage time.
When the STORAGE_TIME is set to LOCAL but you receive time in UTC, data is converted to local time. When UTC is set but the received time is local it is also converted to UTC.
Faces database description 
The general Faces database scheme is listed below.
  Faces database 
 
Attribute  table model 
The database table model describes face attributes linked to faces.
Name 
primary_key 
Type 
Description 
 
 
face_id 
True 
varchar(36) 
face ID 
 
gender 
- 
integer 
Estimated gender. 0- woman, 1 – man 
 
gender_obtaining_method 
- 
integer 
The algorithm used for gender estimation 
 
gender_version 
- 
integer 
Gender estimation algorithm version 
 
age 
- 
integer 
Estimated age 
 
age_obtaining_method 
- 
integer 
The algorithm used for age estimation 
 
age_version 
- 
integer 
Age estimation algorithm version 
 
ethnicity 
- 
integer 
Estimated ethnicity 
 
ethnicity_obtaining_method 
- 
integer 
The algorithm used for ethnicity estimation 
 
ethnicity_version 
- 
integer 
Ethnicity estimation algorithm version 
 
create_time 
- 
timestamp 
Attribute creation date and time 
 
account_id 
- 
varchar(36) 
ID of the account to which the attribute belongs 
 
descriptor_samples_generation 
- 
integer 
The generation of the samples used. If the samples of an attribute are updated, the value changes. The initial value is 0. 
 
namespace 
- 
integer 
0 - the attribute is not attached to a face . face . 
 
 
Descriptor   table model 
The database table model describes descriptors.
Name 
primary_key 
Type 
Description 
 
 
attribute_id 
True 
varchar(36) 
Attribute ID 
 
descriptor_version 
True 
integer 
The version of NN that was used to extract the descriptor 
 
descriptor 
- 
bytea 
Binary descriptor 
 
descriptor_obtaining_method 
- 
integer 
The algorithm that was used to obtain the descriptor 
 
descriptor_generation 
- 
integer 
A generation of the descriptor. If the samples of a descriptor are updated, the value changes. It shows that the descriptor does not match existing samples. The initial value is set to 0. 
 
 
Face  table model 
The database table model describes existing faces .
Name 
primary_key 
Type 
Description 
 
 
face_id 
True 
varchar(36) 
Face  ID 
account_id 
- 
varchar(36) 
The ID of the account to which the face  belongs 
 
event_id 
- 
varchar(36) 
Event ID. A reference to the event that created the Face 
 
user_data 
- 
varchar(128) 
User-defined data for the face  
 
create_time 
- 
timestamp 
Time and date of the face  creation 
 
last_update_time 
- 
timestamp 
Time and date of the last face  update 
 
external_id 
- 
varchar(36) 
Face ID. External ID is specified in the create face request or in the event creation request (when a face is created using the create face policy) 
 
avatar 
- 
varchar(256) 
The URL of a photo image that corresponds to the face. 
 
 
List  table model 
The database table model describes existing lists .
Name 
primary_key 
Type 
Description 
 
 
list_id 
True 
varchar(36) 
List ID 
 
account_id 
- 
varchar(36) 
The ID of the account to which the list  belongs 
 
user_data 
- 
varchar(128) 
The user data for the list  
 
create_time 
- 
timestamp 
The time and date when the list  was created 
 
last_update_time 
- 
timestamp 
The time and date of the last list  update 
 
 
List_face  table model 
The database table model describes the history of attaching faces  to lists . If a face was attached to a list a new record appears.
Name 
primary_key 
Type 
Description 
 
 
list_id 
True 
varchar(36) 
List  ID 
face_id 
True 
varchar(36) 
Face ID 
 
last_update_time 
- 
timestamp 
The date and time of the last attachment of the face to the list 
 
link_key 
- 
integer 
The sequence number of linking the face to the list 
 
 
Unlink_attributes_log table model 
The database table model describes the history of detaching faces from lists . If a face was detached from a list, a new record appears.
Name 
primary_key 
Type 
Description 
 
 
unlink_key 
True 
integer 
The sequence number of the face  and the list unlinking 
 
list_id 
- 
varchar(36) 
List ID 
 
face_id 
- 
varchar(36) 
Face  ID 
link_key 
- 
integer 
The sequence number of linking of the face  and the List 
 
update_time 
- 
timestamp 
Date and time of the last detach of the face  from the List 
 
 
Sample  table model 
The database table model describes links between samples and faces.
Name 
primary_key 
Type 
Description 
 
 
sample_id 
True 
varchar(36) 
Sample 
 
face_id 
True 
varchar(36) 
ID of the face  related to the sample 
 
type 
True 
integer 
1 - the sample was used for descriptor extraction, 5 - the sample was used for basic attributes creation 
 
 
Events database description 
The section describes Events service database.
  Events database 
 
Event table model 
The database table model describes existing events . It includes information about created events and faces.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
account_id 
uuid 
Account ID to which the event belongs 
 
create_time 
timestamp 
The time code of the event occurrence in the video stream. The parameter is used for the real-time monitoring of events creation. 
 
event_id 
uuid 
Event ID 
 
handler_id 
uuid 
The ID of a handler that gave birth to the event 
 
source 
varchar(128) 
An event source. The source is specified in the request for event creation 
 
face_id 
uuid 
The face ID of the face  corresponding to the event. 
 
gender 
smallint 
Gender estimated for the event 
 
age 
smallint 
Age estimated for the event 
 
emotion 
smallint 
Emotion estimated for the event 
 
ethnic_group 
smallint 
Ethnic group estimated for the event 
 
user_data 
varchar(128) 
User data for the face  corresponding to the event. User_data is specified in the request for event creation 
 
external_id 
varchar(36) 
The external ID of the face  corresponding to the event. External_id is specified in the request for event creation 
 
insert_time 
timestamp 
Date and time of the event creation 
 
top_matching_candidates_label 
varchar(36) 
The label of the group of the candidates used for matching. 
 
top_similar_object_id 
uuid 
The ID of the top similar object from matching results (match policy). Matching results are received when the match policy of a handler is enabled 
 
top_similar_object_similarity 
double precision 
Similarity score of the top similar object from matching results. Matching results are received when the match policy of a handler is enabled. 
 
top_similar_object_type 
smallint 
The type of the top similar object: 0 - face, 1 - event 
 
mask 
smallint 
Medical mask estimation result: missing (1), medical_mask (2), occluded (3) 
 
track_id 
varchar(36) 
Track ID of the event 
 
end_time 
timestamp 
The end time code of the event occurrence in the video stream. The parameter is used for the real-time monitoring of events creation. Set equal to create_time if not set 
 
top_similar_external_id 
varchar(36) 
The external ID of the top similar object from matching results (match policy). Matching results are received when the match policy of a handler is enabled 
 
 
Face_detect_result table model 
The database table model describes face detection.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
integer 
Foreign key of an event  
 
rect_x 
smallint 
Top left corner coordinate of the face bounding rectangle by the "X" axis 
 
rect_y 
smallint 
Top left corner coordinate of the face bounding rectangle by the "Y" axis 
 
rect_w 
smallint 
Width of the face bounding rectangle 
 
rect_h 
smallint 
Height of the face bounding rectangle 
 
sample_id 
varchar(36) 
Sample ID 
 
detect_time 
timestamp 
Time of the face detection 
 
image_origin 
varchar(256) 
URL to the source image where the face has occurred 
 
 
Body_detect_result table model 
The database table model describes face detection.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
integer 
Foreign key of an event  
 
rect_x 
smallint 
Top left corner coordinate of the body bounding rectangle by the "X" axis 
 
rect_y 
smallint 
Top left corner coordinate of the body bounding rectangle by the "Y" axis 
 
rect_w 
smallint 
Width of the body bounding rectangle 
 
rect_h 
smallint 
Height of the body bounding rectangle 
 
sample_id 
varchar(36) 
Sample ID 
 
detect_time 
timestamp 
Time of the body detection 
 
image_origin 
varchar(256) 
URL to the source image where the body has occurred 
 
 
Face_descriptor table model 
The database table model describes face descriptors stored in the database.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
bigint 
Foreign key of the event  
 
descriptor 
bytea 
Binary face descriptor 
 
descriptor_version 
integer 
The version of NN that was used to extract the descriptor 
 
 
Body_descriptor table model 
The database table model describes body descriptors stored in the database.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
bigint 
Foreign key of the event  
 
descriptor 
bytea 
Binary body descriptor 
 
descriptor_version 
integer 
The version of NN that was used to extract the descriptor 
 
 
Event_match_result table model 
The database table model describes matching results received using the matching policy of handler. Each record includes information about an event used for matching and the estimated similarity.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
bigint 
Foreign key of the event  
 
label 
varchar(36) 
The label specified for the matching results 
 
similarity 
double precision 
The similarity score received after matching of the event descriptor with the given descriptor 
 
event_id 
uuid 
ID of the event 
 
user_data 
varchar(128) 
User data associated with the event  
 
create_time 
timestamp 
Event  creation time 
external_id 
varchar(36) 
External ID of the event  
 
handler_id 
uuid 
The ID used for the event creation 
 
source 
varchar(128) 
The event source 
 
 
Face_match_result table model 
The database table model describes matching results received using the matching policy of handler. Each record includes information about the face used for matching and the estimated similarity.
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
bigint 
Foreign key of the event  
 
label 
varchar(36) 
The label specified for the matching results 
 
similarity 
double precision 
The similarity score received after matching of the event descriptor with the given face descriptor 
 
face_id 
uuid 
ID of the face  
 
user_data 
varchar(128) 
User data associated with the face  
 
create_time 
timestamp 
Face  creation time 
external_id 
varchar(36) 
External ID of the face  
 
 
Location table model 
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
bigint 
Foreign key of the event  
 
city 
varchar(36) 
The city of event occurrence 
 
area 
varchar(36) 
The area of event occurrence 
 
district 
varchar(36) 
The district of event occurrence 
 
street 
varchar(128) 
The street of event occurrence 
 
house_number 
varchar(36) 
The house number where the event occurred 
 
geo_position 
geography 
Geographical coordinate of the event occurrence (longitude, latitude) 
 
 
Tag table model 
The database table model describes tags for events. Tags are specified in an event creation request. 
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
integer 
Foreign key of an event 
 
tag 
varchar(36) 
An event tag 
 
 
Attach_result table model 
The database table model describes the attachment of the face  created from an event to a list . The face  is created using "face_policy". The face is attached to a list using "link_to_lists_policy".
Name 
Type 
Description 
 
 
id 
bigint 
Primary key of the table (digital) 
 
numeric_id 
integer 
Foreign key of an event 
 
list_id 
uuid 
A list to which the created face  was attached 
 
 
Tasks database 
  Tasks database 
 
Task table model 
The database table model describes the created tasks. It includes general information about a task and its content.
Name 
Type 
Description 
 
 
task_id 
integer 
Task ID 
 
create_time 
timestamp 
Task creation time 
 
end_time 
timestamp 
Task end time 
 
last_update_time 
timestamp 
Task last update time 
 
task_type 
integer 
Task type: unknown (0), linker task (1), clusterization task (2), report creation task (3), garbage collection task (4), additional extraction task (5), cross-matching task (6), ROC-curve calculation task (7), objects export task (8), estimation task (9) 
 
task_status 
integer 
Task status: pending (0), in progress (1), cancelled (2), failed (3), collect results (4), done (5). The status is updated by Tasks workers. 
 
result_id 
varchar(36) 
ID of the task result 
 
account_id 
varchar(36) 
ID of the account to which the task belongs 
 
count_task_parts_done 
integer 
Number of finished subtasks 
 
count_task_parts_all 
integer 
Total number of subtasks 
 
content 
text 
Contains filters and request parameters for the task 
 
description 
varchar(128) 
Contains user-defined task description 
 
 
Subtask table model 
The database table model includes information about created subtasks. Depending on a task type there may be one or several subtasks.
Name 
Type 
Description 
 
 
subtask_id 
integer 
Subtask ID 
 
task_id 
integer 
The ID of the corresponding task 
 
result_id 
varchar(36) 
The ID of the subtask result 
 
create_time 
timestamp 
Subtask creation time 
 
end_time 
timestamp 
Subtask end time 
 
subtask_status 
integer 
Subtask status: pending (0), in progress (1), cancelled (2), failed (3), collect results (4), done (5). The status is updated by Tasks workers 
 
content 
varchar(2048) 
Contains filters and request parameters for a subtask processing 
 
 
Task_error  table model 
The database table model includes information about errors occurred during task processing. Errors are added to the table by Tasks workers.
Name 
Type 
Description 
 
 
error_id 
integer 
A task error ID 
 
task_id 
integer 
ID of the corresponding task 
 
error_code 
integer 
An error code 
 
description 
varchar(64) 
An error short description 
 
detail 
varchar(1024) 
The detailed description of the error 
 
additional_info 
varchar(128) 
Additional information about the error. It may include lost object IDs or any other useful information 
 
error_time 
timestamp 
Time when the error occurred 
 
 
Handlers database 
Oracle and Postgres databases are supported.
  Handlers database 
 
Handler table model 
Name 
Type 
Description 
 
 
account_id 
varchar(36) 
UUID4 standard account ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format, the handler belongs to 
 
create_time 
timestamp 
Date and time of handler creation 
 
description 
varchar(128) 
Handler description provided by the user 
 
handler_id 
varchar(36) 
UUID4 standard handler ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
is_dynamic 
boolean 
Whether the handler is dynamic 
 
last_update_time 
timestamp 
Date and time of last change of the handler 
 
policies 
varchar(2048) 
JSON with policies 
 
 
Verifier table model 
Name 
Type 
Description 
 
 
account_id 
varchar 
UUID4 standard account ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format, the verifier belongs to 
 
create_time 
timestamp 
Date and time of verifier creation 
 
description 
varchar 
Verifier description provided by the user 
 
verifier_id 
varchar(36) 
UUID4 standard verifier ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
last_update_time 
timestamp 
Date and time of the latest handler modification 
 
policies 
varchar(2048) 
JSON with policies 
 
version 
integer 
Verifier version 
 
 
Admin database 
Oracle and Postgres databases are supported.
  Admin database 
 
Admin table model 
Name 
Type 
Description 
 
 
login 
varchar(128) 
Administrator login 
 
password 
varchar(128) 
Administrator password 
 
email 
varchar(64) 
Administrator email 
 
 
Account table model 
Name 
Type 
Description 
 
 
account_id 
varchar(36) 
Administrator login 
 
organization_name 
varchar(128) 
Organization name the account represents 
 
email 
varchar(64) 
Administrator email 
 
 
Configurator database 
  Configurator database 
 
Limitation table model 
Table with limitations.
Name 
Type 
Description 
 
 
limitation_name 
varchar(128) 
Name of the limitation 
 
validation_schema 
varchar 
Limitation validation schema 
 
services 
varchar 
List of services 
 
default_value 
varchar 
Default limitation value 
 
description 
varchar(128) 
Limitation description 
 
 
Settings table model 
Table of settings.
Name 
Type 
Description 
 
 
id 
integer 
Setting ID 
 
value 
varchar 
Setting value 
 
description 
varchar(128) 
Settings description 
 
create_time 
timestamp 
Setting creation time 
 
last_update_time 
timestamp 
Latest time of setting modification 
 
name 
varchar(128) 
Setting name 
 
is_default 
boolean 
Whether the setting is default 
 
 
Tag table model 
Table of tags.
Name 
Type 
Description 
 
 
id 
integer 
Setting ID 
 
name 
varchar(128) 
Setting name 
 
tag 
varchar(128) 
Setting tag string 
 
 
Group table model 
Table of groups.
Name 
Type 
Description 
 
 
group_name 
varchar(128) 
Group name 
 
description 
varchar(256) 
Group description 
 
 
Group limitation table model 
Table of limitation groups links.
Name 
Type 
Description 
 
 
group_name 
varchar(128) 
Group name 
 
limitation_name 
varchar(128) 
Limitation name 
 
 
Configs migration table model 
Name 
Type 
Description 
 
 
revision 
varchar(36) 
Revision of settings migration 
 
 
Backport3 database 
  Backport3 database 
 
Account table model 
Database table model for account.
Name 
Type 
Description 
 
 
account_id 
varchar(36) 
UUID4 standard account ID 
 
active 
boolean 
Account status 
 
password 
varchar(128) 
Hash from the account password 
 
email 
varchar(64) 
Account email 
 
organization_name 
varchar(128) 
Organization name the account represents 
 
 
Account token model table 
Name 
Type 
Description 
 
 
token_id 
varchar(36) 
Token ID 
 
account_id 
varchar(36) 
Account ID, the token is linked to 
 
token_info 
varchar(128) 
A string with token data 
 
 
Person table model 
Database table model for persons.
Name 
Type 
Description 
 
 
person_id 
varchar(36) 
UUID4 standard person ID, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
account_id 
varchar(36) 
UUID4 standard ID of the account to which the person belongs, "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
user_data 
varchar(128) 
Person user data 
 
create_time 
timestamp 
Date and time of person creation 
 
external_id 
varchar(36) 
Person ID in external system 
 
 
Persons list table model 
Name 
Type 
Description 
 
 
list_id 
varchar(36) 
UUID4 standard list ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
account_id 
varchar(36) 
UUID4 standard account ID, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
create_time 
timestamp 
Date and time of list creation 
 
 
Descriptors list table model 
Name 
Type 
Description 
 
 
list_id 
(varchar(36) 
UUID4 standard list ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
account_id 
(varchar(36) 
UUID4 standard account ID, the list belongs to, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
create_time 
timestamp 
Date and time of list creation 
 
 
List to person table model 
Database table model for links between persons and lists.
Name 
Type 
Description 
 
 
list_id 
varchar(36) 
UUID4 standard list ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
person_id 
varchar(36) 
UUID4 standard person ID, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
 
Person to face table model 
Database table model for links between persons and faces.
Name 
Type 
Description 
 
 
person_id 
varchar(36) 
UUID4 standard person ID, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
face_id 
varchar(36) 
UUID4 standard face ID, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
 
Handler table model 
Database table model for handlers.
Name 
Type 
Description 
 
 
handler_id 
varchar(36) 
UUID4 standard handler ID in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
account_id 
varchar(36) 
UUID4 standard account ID, the handler belongs to, in "xxxxxxxx-xxxx-4xxx-xx-xxxxxxxxxxxx" format 
 
create_time 
timestamp 
Date and time of handler creation 
 
last_update_time 
timestamp 
Date and time of the latest handler modification 
 
policies 
varchar(2048) 
JSON with policies 
 
type 
integer 
Handler type 
 
version 
integer 
Handler version