# 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 anywhere. 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.&#x20;

To enable this mode, when you prepare the config.py file to run the API, set the `OZ_APP_COMPONENTS` parameter to `stateless`.  Call `POST /api/instant/folders/` to send the request without saving any data. Authorization for Instant API should be set on your side.

{% hint style="info" %}
Please note: as Instant API doesn't store data, it is not intended to work with Blacklist (1:N).
{% endhint %}

If you use Instant API with Web SDK, in Web Adapter [configuration](https://doc.ozforensics.com/oz-knowledge/guides/administrator-guide/web-adapter/configuration-file-settings), set `architecture` to `lite`. The version of Web SDK should be 1.7.14 or above.

## Requirements

* CPU: 16 cores, 32 threads, base frequency – 2.3 GHz, single-core maximum turbo frequency – 4 GHz.
* RAM: 32 GB, DDR 5, Dual Channel.

To evaluate your RPS and RPM and configure your system for optimal performance, please contact us.

## 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.

```bash
# 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

```bash
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

```bash
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
```

## Instant API Methods

You can find the Instant API methods [here](https://documenter.getpostman.com/view/28105966/2sB34eJMYC) or download the collection below.

{% file src="<https://2532558063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5g6dgsxRbyrCvB0uAf8f%2Fuploads%2F1tEFwsQZ5bXsKEwm1jv9%2FOZ-Forensic%20Instant%206.0.0.postman_collection.json?alt=media&token=a6986e8b-f785-47d0-a68f-0c4f299fb6e7>" %}
