LogoLogo
To the Oz WebsiteOz API ReferenceContact Us
  • General
    • Oz Liveness and Biometry Key Concepts
      • Solution Architecture
      • Liveness, Face Matching, Black List Checks
      • Passive and Active Liveness
      • Hybrid Liveness
      • Oz API Key Concepts
      • Oz API vs. Oz API Lite
      • SaaS, On-premise, On-device: What to Choose
      • Oz Licensing Options
    • Integration Quick Start Guides
      • Server-Based Liveness
        • How to Integrate Server-Based Liveness into Your Web Application
        • How to Integrate Server-Based Liveness into Your Mobile Application
        • How to Check Your Media for Liveness without Oz Front End
      • On-Device Liveness
        • How to Integrate On-Device Liveness into Your Mobile Application
      • Face Matching
        • How to Add Face Matching of Liveness Video with a Reference Photo From Your Database
        • How to Add Photo ID Capture and Face Matching to Your Web or Mobile Application
  • Guides
    • Developer Guide
      • API
        • Oz API
          • Working with Oz System: Basic Scenarios
            • Authentication
            • Uploading Media
            • Liveness
            • Biometry (Face Matching)
            • Best Shot
            • Blacklist Check
              • Blacklist (Collection) Management in Oz API
            • Quantitative Results
            • Using a Webhook to Get Results
            • Single Request
            • Instant API: Non-Persistent Mode
          • System Objects
          • User Roles
          • Types of Analyses and What They Check
          • Rules of Assigning Analyses
          • Statuses in API
          • Media Tags
          • Metadata
          • API Error Codes
          • Oz API Postman Collections
          • Changelog
        • Oz API Lite
          • API Lite Methods
          • Oz API Lite Postman Collection
          • Changelog
      • SDK
        • Oz Mobile SDK (iOS, Android, Flutter)
          • On-Device Mode
          • Android
            • Getting a License for Android SDK
              • Master License for Android
            • Adding SDK to a Project
            • Connecting SDK to API
            • Capturing Videos
            • Checking Liveness and Face Biometry
            • Customizing Android SDK
              • How to Restore the Previous Design after an Update
            • Android Localization: Adding a Custom or Updating an Existing Language Pack
            • Android SDK Methods and Properties
            • Changelog
          • iOS
            • Getting a License for iOS SDK
              • Master License for iOS
            • Adding SDK to a Client’s Mobile App
            • Connecting SDK to API
            • Capturing Videos
            • Checking Liveness and Face Biometry
            • Customizing iOS SDK Interface
              • How to Restore the Previous Design after an Update
            • iOS Localization: Adding a Custom or Updating an Existing Language Pack
            • iOS SDK Methods and Properties
            • Changelog
          • Flutter
            • How to Install and Use Oz Flutter Plugin
            • Flutter SDK Methods and Properties
            • Changelog
        • Oz Liveness Web SDK
          • Web Plugin
            • Adding the Plugin to Your Web Page
            • Launching the Plugin
              • Description of the on_complete Callback
              • Description of the on_result Callback
              • Capturing Video and Description of the on_capture_complete Callback
              • Description of the on_error Callback
            • Closing or Hiding the Plugin
            • Localization: Adding a Custom Language Pack
            • Look-and-Feel Customization
              • Customization Options for Older Versions (before 1.0.1)
            • Security Recommendations
            • Browser Compatibility
            • No-Server Licensing
          • Changelog
    • Administrator Guide
      • Deployment Architecture
      • Installation in Docker
      • Installation in Kubernetes
      • Performance and Scalability Guide
      • Publishing API Methods in the Internet: Security Recommendations
      • Monitoring
      • License Server
      • Web Adapter Configuration
        • Installation and Licensing
        • Configuration File Settings
        • Configuration Using Environment Variables
        • Server Configuration via Environment Variables
      • Oz API Configuration
    • User Guide
      • Oz Web UI
        • Requesting Analyses
        • Users and Companies
        • Blacklist
        • Statistics
        • Settings
        • Changelog
  • Other
    • Media Quality Requirements
    • Oz SDK Media Quality Checks
    • Media File Size Overview
    • Compatibility
    • FAQ
    • Tips and Tricks
      • Oz Liveness Gestures: Table of Correspondence
      • Sudo without Password
      • Android: Certificate Validation Error
    • Previous Documentation
      • Mobile SDK
        • Android
          • Interactions with the Oz API Server
          • Uploading and Analyzing Media
        • iOS
          • Uploading and Analyzing Media
      • User Guides
        • Oz Demo Kit
        • Web UI
      • Oz Modules Installation
        • Standalone Installer
        • Oz System Lite
Powered by GitBook
On this page
  • Initial Configuration
  • Postgres Connection
  • Path to Media Files
  • Connection to Oz Bio / Liveness
  • Timing and Limits

Was this helpful?

Export as PDF
  1. Guides
  2. Administrator Guide

Oz API Configuration

PreviousServer Configuration via Environment VariablesNextUser Guide

Last updated 29 days ago

Was this helpful?

The configuration settings are contained in theconfig.py file. Its location depends on the installation method:

  • host machine or Docker container oz-api: /opt/gateway/configs

  • : /var/lib/docker/volumes/api_oz-api-config-vol/_data

Initial Configuration

These parameters are mandatory. Please note: if you require the Instant API mode (with no data saved anywhere), set OZ_APP_COMPONENTS=stateless. Otherwise, to save data for orders and analyses, set OZ_APP_COMPONENTS=auth,stateful,oz_collections, where:

  • auth is an authentication module,

  • stateful is a module for full API,

  • oz_collections is a module for the blacklist analysis (remove if you don't use it).

# application components list
OZ_APP_COMPONENTS=auth,stateful,oz_collections
# enable local storage support
OZ_LOCAL_STORAGE_SUPPORT_ENABLE=false
# tfss service 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

Postgres Connection

This is needed only if you use the full API version.

DB_USER = 'user name'
DB_HOST = 'Postgres server address'
DB_PASS = 'user password'
DB_NAME = 'database name'

Path to Media Files

All incoming media files are saved in the local directory mounted to one of possible endpoints depending of the installation method:

  • host server or Docker container: /opt/gateway/static

  • in case of standalone installer: /var/lib/docker/volumes/api_oz-api-static-vol/_data

  • any path specified via configuration

In most of the integration cases, the media files can be accessed in web using the direct links to randomly generated filenames.

To access the media, you need to specify in the configuration file their external host name or IP address, port, and connection protocol.

PORT = 443
SCHEME = 'https'
HOST = 'api.globalbank.com'

Connection to Oz Bio / Liveness

OZ_SERVICE_TFSS_HOST = 'http://bio-server-name:8501/v1/'

Timing and Limits

# amount of retries to perform analyses to Oz Bio
OZ_CELERY_RETRY_MAX_COUNT = 7
# delay between tries
OZ_CELERY_RETRY_STEP = 30

# maximum wait time of one analyse
OZ_ANALYSE_PROCESSING_EXPIRE_TIMEOUT = 15 * 60  # 15 minutes
# maximum wait time of analyse from API
OZ_ANALYSE_DELIVERY_EXPIRE_TIMEOUT = 60 * 60  # 1 hour
# frequency for check analyse expiration
OZ_ANALYSE_EXPIRE_BEAT_PERIOD = 1 * 60  # every minute

# maximum amount of attached media
OZ_ATTACHMENT_MAX_COUNT = 10
# maximum size of one media file
OZ_ATTACHMENT_MAX_SIZE = 10 * 1024 * 1024  # 10Mb

# amount of seconds until access token expiration
OZ_SESSION_TTL = 60 * 15  # 15 minutes
# amount of seconds until service access token expiration
OZ_SESSION_LONGLIVE_TTL = 60 * 60 * 24 * 365 * 5  # 5 years

# maximum size of thumbnail in bytes
OZ_IMAGE_SIZE_THUMBNAIL = 300
# maximum duration of video file
OZ_VIDEO_DURATION_MAX = 30

standalone installer