Skip to main content
Version: 2.4.0

Integrations

Webhooks

To set up data transfer via webhooks, go to the config/run_params.json configuration file and specify values for the webhook_tracking_subscribers parameter. This parameter represents a list of objects to determine the address of the server that receives data from OMNI agent and is available in two versions:

Version 1

{
"url": "http://127.0.0.1:5000/trigger" // address with the endpoint
}

Version 2 (default)

{ 
"host": "127.0.0.1", // address
"port": "5000", // port
"is_secured": false, // http/https flag
"path": "/trigger" // endpoint
}

You can also add a webhook in Settings of OMNI Agent web interface.

Data is transmitted via webhooks in the format of processes. An array of processes is sent every 5 seconds (by default) as well as at the beginning and end of tracking, when a person is matched with a database, when a person gets into ROI or crosses marked lines.

To change the process transfer interval, edit the ongoings_interval_in_msec field in the config/run_params.json file (measured in milliseconds).

To send bestshots via webhooks, enable the "Send bestshots in webhook" option in the Settings of the OMNI Agent web interface, or specify the value true for the enable_webhook_image2jpg_conversion field. The default value is false. The bestshot is encoded in base64 as a jpeg image.

API Reference

OMNI Agent uses the following HTTP endpoints:

/about

Get information about OMNI Agent version.

Method: GET

Request parameters: -

Response parameters:

  • version: string - OMNI Agent version
  • full_version_with_hash: string - OMNI Agent version with hash
  • build_hash: string - hash of the git commit from which OMNI Agent is built
  • build_date: string - OMNI Agent build date
  • name: string - name of OMNI Agent executable file
  • used_software: object - an object that describes the versions of used libraries
    • FaceSDK: string - Face SDK version
  • may_be_standalone: bool - availability of Standalone mode

/external_process/begin

Launching an external (media) process.

Method: POST

Request parameters:

  • repeats: bool - a sign of a repeated (looped) process
  • name: string - name (the name of video file for the Media class)
  • class: string - external process class (default class is media)
  • duration: int - estimated length of the process. The default is 0.
    • 0 - length unknown.
  • started_at: int - internal timestamp of external process start.
  • stream_uuid: UUID string - ID of the camera to which this external process is bound. The default is an empty string.
    • Processes not attached to cameras are ignored.

Response parameters: -

/external_process/end

Stopping the last open external (media) process with the requested parameters (marked with an asterisk).

Method: POST

Request parameters:

  • name*: string - name (the name of video file for the Media class)
  • class*: string - external process class (default class is media)
  • stopped_at: int - internal timestamp for stopping the external process.
  • stream_uuid: UUID string - ID of the camera to which this external process is attached. The default is an empty string.
    • Processes not attached to cameras are ignored.

Response parameters: -

/external_process/terminate_all

Stopping all open external processes associated with the video stream with the corresponding UUID.

Method: POST

Request parameters:

  • stream_uuid: UUID string - camera ID, empty string by default.
    • If empty string - all processes are deleted (for all cameras)

Response parameters: -

/multistream_bodies

Request for map tracking.

Method: GET

Query parameters: -

Response parameters:

  • views: object - view name → view object mapping.
    • <view name>: object - contains information about body detections in this view. The object name corresponds to the view name. The default name is "top_view".
      • view_name: string - view name. The default is "top_view".
      • camera_frames_data: object - objects with timestamps of frames on which initial detections were received, for each video stream in the form of stream_uuid → frame_data mapping.
        • <stream_uuid>: object - an object with timestamps of the frame on which the original detection was received. Object name is video stream ID.
          • frame_index, timestamp_microsec, timestamp_millisec, video_timestamp
      • objects: array multistream objects - array of multistream body detections
        • object - information about body detection on the given view (map)
          • bbox: array float[2…] - detection coordinates on the given view (sequence of X, Y coordinates). The number of points is at least 1, determined by the method of transforming the bbox coordinates of the source objects. By default, it contains the coordinates of 1 point corresponding to the position of the person's feet on the map.
          • class: string = "body".
          • id: int - serial number of the detection on the given view. In general, it does not match the detection numbers of the original objects.
          • score: float - detector confidence, the average value of the parameter of the source objects.
          • source_objects: object - stream_uuid → source object mapping.
            • <stream_uuid>: object - source detection object on stream_uuid video stream.
note

If the "Tracking people on the map (Beta)" feature is disabled or configured incorrectly, the contents of the views object will be empty.