Video
The /video
endpoint provides a mechanism for creating videos to attach to transactions and retrieving the locally saved video.
The response to a call to the /video
endpoint is a video stream from the device of current locally saved video. If there is no video then a Not Found error is returned.
Start Video
Request the device to begin color video recording. This can be accessed with the following endpoint
/api/v1/video/start
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/video/start" \
-X POST
HTTP/1.1 200 OK
Content-Length: 0
Date: Fri, 16 May 2025 18:34:52 GMT
Server: Kestrel
api-supported-versions: 1.0
Request Parameters
The start video request has multiple optional query strings to help pass custom values and reference transactions. All parameters are optional.
Video Only
mode as they will be overwritten otherwise during a measurement.Queries
Property | Data Type | Description |
---|---|---|
TransactionReference | string | a host-supplied transaction reference for tracking purposes. This can be any value you wish to supply as something that will be tracked with the video operation in enVision Cloud and returned in the response. Possible values are an Order ID, Tracking Number or Barcoded identifier. |
CustomReference1 | string | a custom host-supplied reference. This value will be tagged to the transaction stored in enVision Cloud. |
CustomReference2 | string | a custom host-supplied reference. This value will be tagged to the transaction stored in enVision Cloud. |
CustomReference3 | string | a custom host-supplied reference. This value will be tagged to the transaction stored in enVision Cloud. |
Example Query Request
An example request to measure with the query parameters
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/video/start?transactionReference=ABCD123&customReference1=XYZ123&customReference2=XYZ123&customReference3=XYZ123" \
-X POST
Stop Video
Requests the video to stop and encode. This endpoint will only work in Video Only
mode. To trigger a stop in Video with Measurement
mode trigger a measurement. When the video is stopped it will be saved as a transaction to enVision Cloud using the queries called using the Start Video command. The stop endpoint can be accessed at the following location.
/api/v1/video/stop
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/video/stop" \
-X POST
HTTP/1.1 200 OK
Content-Length: 0
Date: Fri, 16 May 2025 18:34:52 GMT
Server: Kestrel
api-supported-versions: 1.0
Cancel Video
Requests the video to stop and clear all saved video data in memory and local storage on the enVision K150S device. This can be accessed at the following endpoint
/api/v1/video/cancel
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/video/cancel" \
-X POST
HTTP/1.1 200 OK
Content-Length: 0
Date: Fri, 16 May 2025 18:34:52 GMT
Server: Kestrel
api-supported-versions: 1.0
Stream Video
Requests for the video saved locally on the enVision K150S device and streams it instead of downloading all the data at once. This will return a video stream or the HTTP Partial Content (206) Status Code.
Video Only
mode or after a failed transaction in Video Measurement
mode. Otherwise there will be no accessible videoThis can be accessed at the following endpoints
/api/v1/video
/api/v1/video/stream
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/video" \
-X GET \
--output "output_video.mp4"
Download Video
Requests for the video saved locally on the enVision K150S device and downloads all the video data. This will return a video download or the HTTP OK (200) Status Code.
Video Only
mode or after a failed transaction in Video Measurement
mode. Otherwise there will be no accessible videoThis can be accessed at the following endpoint
/api/v1/video/download
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/video/download" \
-X GET \
--output "output_video.mp4"