Uploading a file

Clearance Developer Guide

Content type
Guides > Developer guides
Product line
Clearance
Language
English
Applies to
Genetec Clearance

To upload files in Genetec Clearance™, you can use the Document Service API as your entry point. An Evidence entity represents a single digital Evidence item, but other files (resources) can be necessary for accommodating various data representations or including required metadata for media files.

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


image

Consult Operations on Block Blobs - Put Block for more information.


image

To upload a file:

  1. Create a new evidence item.

    In the background, the system creates a new container in Azure Storage.

  2. Create a new resource for the first file to upload.

    The system returns a URI that contains an Azure SAS token.

  3. Upload the encrypted file using the Azure Storage SDK or the Azure Storage REST API.

  4. Notify Clearance that this resource is completed after the upload is completed.

    POST {BaseURL}/tenant/{tenantId}/evidence/{evidenceId}/resource/{resourceId}/complete.

  5. Repeat steps 2 to 4 for every file that 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 purges the incomplete file 24 hours later.

Parallel upload

The system is designed to permit upload of up to five files or resources 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.