How to upload a file

The Document Service API is the entry point to upload files in Clearance.

Files are represented as resources in the API, and the resources are grouped under one Evidence item.

An Evidence entity represents ONE digital evidence item, but sometimes more than one file (resource) is required because different representations of the same data are possible or meta-data is required to complete a media file.

342

To upload a file, using the Document Service API after authenticated to the STS you must:

587
  1. Create a new evidence item. The system will, in the background, create a new container in Azure Storage
  2. Create a new resource for the first file to upload. The system will return a URI that contains an Azure SAS token
  3. Upload the encrypted file using Azure Storage SDK or Azure Storage REST API
  4. After the upload is completed, notify Clearance that this resource is completed.
    POST {BaseURL}/tenant/{tenantId}/evidence/{evidenceId}/resource/{resourceId}/complete
  5. Do step 2 to 4 for every file you need to include in the evidence.
  6. Notify Clearance that your evidence is completed.

If the evidence and the resource are not completed, Clearance will purge the incomplete file 24 hours later.

Parallel upload

The system is designed to permit upload of up to 5 file/resource in parallel with one Evidence item. It is possible to upload the data from many evidences in parallel. The number of parallel uploads needs to be allocated based on the bandwidth available between the offline recording device and the HTTP upload service.