For the complete documentation index, see llms.txt. This page is also available as Markdown.

OzCapsula Data Container

Configuring Oz API

The main change in interaction with API is that you require to send data with another content type, as data container is a binary file: Content-Type = application/octet-stream. We've added support for this content type along with container functionality.

Also, Instant API now requires client’s private and public keys to function. The paths to these keys should be specified in OZ_JWT_PRIVATE_KEY_PATH and OZ_JWT_PUBLIC_KEY_PATH in the configuration file.

To generate them, use commands as listed below.

# Generate private key:
openssl ecparam -name secp384r1 -genkey -noout | openssl pkcs8 -topk8 -nocrypt -out ./jwt.key
# Generate public key:
openssl ec -in ./jwt.key -pubout -out ./jwt.pub

Examples

POST api/folders:

curl -X POST \
  '{{host}}/api/folders' \
  -H 'Content-Type: application/octet-stream' \
  -H 'X-Forensic-Access-Token: <YOUR_TOKEN>' \
  --data-binary '@/path/to/container.dat'

POST api/instant/folders:

curl -X POST \
  '{{host}}api/instant/folders' \
  -H 'Content-Type: application/octet-stream' \
  -H 'X-Forensic-Access-Token: <YOUR_TOKEN>' \
  --data-binary '@/path/to/container.dat'

Exceptions

Error code

Error message

Description

3

Invalid request data

Missing payload.json

4

Invalid request data

No media have been added into container

5

Invalid request data

Container is damaged

13

Invalid request data

API didn’t receive the container

14

Invalid request data

The container appears to be affected by errors and can’t be unpackaged.

Obtaining a Session Token

Before you start with SDK, obtain a session token:

  1. (Optional, only if you use stateful API) Authorize as any non-OPERATOR role.

  2. Call GET {{host}}/api/authorize/session_token.

Example request

Example response

Last updated

Was this helpful?