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.pubExamples
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
13
No data container provided
API didn’t receive the container
14
Data container unpacking failed
Invalid Data Container
Invalid signature
Invalid SummingHash
Invalid or empty Session Token
The container appears to contain errors and can’t be unpackaged.
Obtaining a Session Token
Before you start with SDK, obtain a session token:
(Optional, only if you use stateful API) Authorize as any non-OPERATOR role.
Call
GET {{host}}/api/authorize/session_token.
Example request
Example response

Last updated
Was this helpful?
