Instant API: Non-Persistent Mode

Instant API, or non-persistent operation mode, has been introduced in API 6.0.1. It is a mode where we do not save any data everywhere. All data is being used only within a request: you send it, receive the response, and that's all, nothing gets recorded. This ensures you do not store any sensitive data, which might be crucial for GDPR compliance. Also, it significantly reduces storage requirements. Authorization for Instant API should be set on your side.

To enable this mode, when you prepare the config.py file to run the API, set the OZ_APP_COMPONENTS parameter to stateless. Call /api/instant/folders/ to send the request without saving any data.

Please note: as Instant API doesn't store data, it is not intended to work with Blacklist (O2N).

if you use Instant API with Web SDK, in Web Adapter configuration, set architecture to lite. The version of Web SDK should be 1.7.13 or above.

Requirements

These are minimal Instant API requirements. The following hardware configuration alllow performing up to 58 analyses per minute with up to three analyses working simultaneously.

  • CPU: 16 cores, 32 threads, base frequency – 2.3 GHz, single-core maximum turbo frequency – 4 GHz.

  • RAM: 32 GB, DDR 5, Dual Channel.

Configuration File Parameters

Prior to the launch, prepare a configuration file with the parameters listed below.

Mandatory Parameters

These parameters are crucial to run Instant API.

# application components list, values for Instant API: auth,stateless
# auth is for Oz authentication component
OZ_APP_COMPONENTS=stateless
# local storage support enable
OZ_LOCAL_STORAGE_SUPPORT_ENABLE=false
# service tfss host
OZ_SERVICE_TFSS_HOST=http://xxx.xxx.xxx.xxx:xxxx
# allowed hosts
APP_ALLOWED_HOSTS=example-host1.com,example-host2.com
# secret key
OZ_API_SECRET_KEY=long_secret_key

Installation

Docker

CONTAINER_NAME=<container name> \
DEPLOY_INSTANT_PORT_EXT=<external port> \
INSTANT_IMAGE=<provided image name> \
ADDITIONAL_PARAMS="-e LICENSE_KEY=<your license key>" \

docker run -d --name $CONTAINER_NAME
      $ADDITIONAL_PARAMS
      -p ${DEPLOY_INSTANT_PORT_EXT}:8080
      $INSTANT_IMAGE

Docker Compose

services:
  oz-api-instant:
    image: <provided image>
    container_name: oz-api-instant
    environment:
        - LICENSE_KEY=<your license key>
        # - TF_ENABLE_ONEDNN_OPTS=1 # In some cases, especially for AMD CPUs, set to 0
        # - API_LISTEN_PORT=8080
        # - LOG_LEVEL=info # ['critical', 'error', 'warning', 'info', 'debug', 'trace']
    restart: always
    ports:
      - 8080:8080

Last updated

Was this helpful?