Architecture
user

A user of the system, who manages the facilities equipped with IP cameras. A user must belong to an organization.

id (string) - Unique identifier of the user.
name (string) - Name of the user.
password (string) - Hash of the user's password.
is_admin (bool) - Indicates if the user has admin privileges.
api_key (string) - Hash of the user's API key
api_key_expiry_date (datetime) - Date when the API key expires
video_retention_days (int) - Account-level setting for the number of days to retain video clips.
stream_retention_hours (int) - Account-level setting for the number of hours to retain live stream in KVS.
review_high_risk_members (bool) - Account-level setting to determine if high-risk members should always be reviewed by agents
organization_id (int) - The organization to which the user belongs.
organization

An organization that manages multiple users and locations. Billing is done at an organization level.

id (int) - Unique identifier of the organization.
name (string) - Name of the organization.
email (string) - Email address of the organization.
phone (string) - Phone number of the organization.
address (string) - Address of the organization.
created_at (datetime) - Timestamp when the organization was created.
is_active (bool) - Indicates if the organization is active.
is_admin (bool) - Indicates if the organization has admin privileges.
location

A location managed by a user, equipped with cameras. A location is typically an entrance, so a facility can have multiple locations.

id (int) - Unique identifier of the location.
user_id (string) - The user who owns this location.
name (string) - Name of the location.
upload_method (enum) - Method of uploading video streams. Enum of ( UserUpload, RTSP, Custom )
custom_upload_method (string) - Custom upload method if applicable.
operational_hours (json) - Operational schedule of the TAILDET-AI for the location.
video_retention_days (int) - Number of days to retain video clips.
stream_retention_hours (int) - Number of hours to retain live streams.
review_high_risk_members (bool) - Whether high-risk members should always be reviewed.
camera

A camera installed at a location.

id (int) - Unique identifier of the camera.
location_id (int) - The location where the camera is installed.
display_order (int) - Display order of the camera.
name (string) - Name of the camera.
stream_url (string) - URL of the camera's RTSP stream.
threshold (float) - Threshold for detection.
minimum_time (float) - Minimum time for detection.
offset_amount (int) - Offset amount in seconds when creating a video clip from KVS.
x1 (float) - x coordinate of the 1st point of the entrance
y1 (float) - y coordinate of the 1st point of the entrance
x2 (float) - x coordinate of the 2nd point of the entrance
y2 (float) - y coordinate of the 2nd point of the entrance
x3 (float) - x coordinate of the 3rd point of the entrance
y3 (float) - y coordinate of the 3rd point of the entrance
x4 (float) - x coordinate of the 4th point of the entrance
y4 (float) - y coordinate of the 4th point of the entrance
nx (float) - x component of the normalized vector that is normal to the entrance
ny (float) - y component of the normalized vector that is normal to the entrance
action

An action performed by a user on an event.

id (int) - Unique identifier of the action.
user_id (string) - The user who performed the action.
name (string) - Name of the action.
is_tailgating (bool) - Indicates if the action is done on a tailgating event.
is_enabled (bool) - Whether the action is enabled.
is_deleted (bool) - Whether the action is deleted.
event

An event recorded in the system. Review is done on a per-event basis.


It consists of a collection of entries. When multiple people scan their cards within certain amount of time, they will be considered as one event, and each scan will create an entry.


An event will be marked as tailgating if the number of people detected exceeds the number of people scanned in an event.

id (string) - Unique identifier of the event.
location_id (int) - The location where the event occurred.
processed_at (datetime) - Timestamp when the event was processed by the AI engine.
reviewed_at (datetime) - Timestamp when the event was reviewed by an agent.
deleted_at (datetime) - Timestamp when the event was deleted.
is_merged (bool) - Whether the event is merged.
action_id (int) - The action associated with the event.
is_saved (bool) - Whether the event is saved.
coment (string) - Comment associated with the event.
entry

An entry associated with an event. Scanning a card creates an entry by calling POST /entry


An entry consists of a collection of videos as a location can have multiple cameras. Each camera creates a video on member entry.

id (string) - Unique identifier of the entry.
event_id (string) - The event associated with the entry.
member_id (string) - User-side identifier of the member involved in the entry.
member_meta (json) - Metadata about the member provided by the user.
entered_at (datetime) - Timestamp when the entry occurred.
status (enum) - Status of the entry.
video

A video associated with an entry and a camera.

id (string) - Unique identifier of the video.
camera_id (int) - The camera that recorded the video.
entry_id (string) - The entry associated with the video.
status (enum) - Status of the video.
uploaded_at (datetime) - Timestamp when the video was uploaded.
high_risk_member

A member flagged as high risk.

id (int) - Unique identifier of the high-risk member.
user_id (string) - The user who flagged the member.
member_id (string) - User-side identifier of the high-risk member.
is_deleted (bool) - Whether the member is deleted.
created_at (datetime) - Timestamp when the member was flagged.