Video Management System
This API is used to export Video Incidents from systems like Genetec in to ALO
In order to have access to the VMS endpoints you will need extra permissions associated with your API Authentication Key. Contact ALO for more information about obtaining this permission.
Multipart File Uploads
For large files (100+ MB )you will need to upload in chunks. This process involve multiple steps:
Signal to ALO that you need to start a multipart upload (Create Multipart Upload)
Make a request to ALO to get the signed urls for all the file parts (Get Upload Urls)
Upload the URLs directly to S3 using the upload urls
Signal to ALO the you completed uploading the files (Complete Multipart Upload) if you have successfully uploaded the files.
Signal to ALO to abort the process (Abort Multipart Upload) if you were unable to upload the videos.
Create Multipart Upload
This starts the process of upload multipart files
GET/vms/incidents/{incident_id}/create_multipart_upload?file_id={fileId}&filename={filename}
/vms/incidents/{incident_id}/create_multipart_upload?file_id={fileId}&filename={filename}
Path Parameters
Parameter | Description |
incident_id | Id of the incident you are uploading files for |
Query Parameters
Parameter | Description |
file_id | Unique id of the file being uploaded |
filename | Name of the file being uploaded |
Example Request
Success Response
A successful get response will have an HTTP status of 200
Response Properties
Property | Description |
---|---|
s3_key | s3_key you need to provide in the Get Upload Urls request |
upload_id | upload_id that you ned to provide in the Get Upload Urls request |
Example Response
Get Upload Urls
In order for you to upload video files and thumbnails you need to make a request to get a signed S3 upload url.
For small files (under 100 MB) you can upload the filed on 1 piece.
For larger files you will need to upload in chunks. See Multipart File Uploads
POST /vms/incidents/{incident_id}/upload_urls
/vms/incidents/{incident_id}/upload_urls
Path Parameters
Parameter | Description |
incident_id | Id of the incident you are uploading files for |
Body Parameters
Parameter | Required | Default | Description |
files | Yes | {} | Hash of file objects by file id |
File Object Definition
Parameter | Required | Default | Description |
part_count | Yes (If multipart upload) | The number of part involved in the multipart upload | |
s3_key | Yes (If multipart upload) | S3 key that you received when creating a multipart upload | |
upload_id | Yes (If multipart upload) | Upload id that you received when creating a multipart upload | |
filename | Yes (If not a multipart upload) | Name of the file you are uploading if its not a multipart upload |
Example Payload
This is what a payload might look like if you need urls for a multipart video and its thumbnail
Success Response
A successful get response will have an HTTP status of 200
Response Properties
Example Response
Complete Multipart Upload
Call the endpoint after you have uploaded your multipart files
POST
/vms/incidents/{incident_id}/complete_multipart_upload
POST
/vms/incidents/{incident_id}/complete_multipart_upload
Body Parameters
Parameter | Required | Default | Description |
s3_key | Yes | s3_key that was acquired in the Create Multipart Upload request | |
upload_id | Yes | upload_id that was acquired in the Create Multipart Upload request | |
parts | Yes | Array of etag strings. Each part will have an etag returned when you upload the part. The etags must be ordered by part (the first string in the array must be the etag for the first file part) |
Example Payload
Success Response
A successful get response will have an HTTP status of 200
The body of the response will contain the s3_key and upload_id
Abort Multipart Upload
If you start a mutlipart upload and it fails you need to make a request to abort the process.
GET
/vms/incidents/{incident_id}/abort_multipart_upload?s3_key={s3_key}&upload_id={upload_id}
GET
/vms/incidents/{incident_id}/abort_multipart_upload?s3_key={s3_key}&upload_id={upload_id}
Path Parameters
Parameter | Description |
incident_id | Id of the incident you are uploading files for |
Query Parameters
Parameter | Description |
s3_key | s3_key you provided during Create Multipart Upload |
upload_id | upload_id you provided during Create Multipart Upload |
Example Request
Success Response
A successful get response will have an HTTP status of 200
The body of the response will contain the s3_key and upload_id
Get An Incident
Get information about an incident that has already been uploaded to ALO
GET
/vms/incidents/{incident_id}
GET
/vms/incidents/{incident_id}
Path Parameters
Parameter | Description |
incident_id | Id of the incident you are requesting information about |
Success Response
A successful get response will have an HTTP status of 200
Response Properties
Example Response Body
Create/Update Incident
PUT /vms/incidents/{incident_id}
PUT /vms/incidents/{incident_id}
Path Parameters
Parameter | Description |
incident_id | Id of the incident you are creating or updating |
Body Parameters
Parameter | Required | Default | Description |
title | No | Incident title | |
description | No | Incident Description | |
created_at | No | Date/Time Incident was created in external system | |
updated_at | No | Date/Time Incident was created in external system | |
longitude | No | Longitude of the incident | |
latitude | No | Latitude of the incident | |
uploaded_videos | Yes | [] | Array of uploaded video objects |
failed_videos | Yes | [] | Array of video objects that failed to be uploaded to ALO |
Video Object Definition
Parameter | Required | Default | Description |
id | Yes | Unique id of the video | |
started_at | No | Date/Time the video started at | |
ended_at | No | Date/Time video ended at | |
camera_name | No | Name of the camera the recorded the video | |
camera_description | No | Description of the camera the recorded the video | |
camera_longitude | No | Longitude of the camera the recorded the video | |
camera_latitude | No | Latitude of the camera the recorded the video | |
s3_key | Yes (if video was successfully uploaded) | S3 key for the video file that was uploaded to ALO | |
s3_thumbnail_key | No | S3 key for the thumbnail file that was uploaded to ALO | |
upload_errors | Yes (if the video failed to upload to ALO) | [] | Array of strings representing any error messages that were gathered in the upload process |
Example Payload
Success Response
A successful get response will have an HTTP status of 200/201
Response Properties
The payload in the response will be the same as seen when calling GET on an existing incident
Last updated