- Legion API
- Streams
- Start video download
Start video download
const url = 'https://us-gov.legion.picogrid.com/v2/streams/example/download-video?start=example&end=example';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://us-gov.legion.picogrid.com/v2/streams/example/download-video?start=example&end=example'Start a download of an mp4 clip from a stream. Clips are limited to 100MB in size, and only support downloads from less than 24 hours ago. Downloads will be available for 24 hours, after that the returned id is invalid.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the stream you want to start a video download for
Query Parameters
Section titled “Query Parameters”The timestamp specifying the beginning of the video you want to download. The format is a string containing an integer in epoch milliseconds as explained further here: https://en.wikipedia.org/wiki/Unix_time
The timestamp specifying the end of the video you want to download. The format is a string containing an integer in epoch milliseconds as explained further here: https://en.wikipedia.org/wiki/Unix_time
The id of the organization to start the video download for
Responses
Section titled “Responses”Success
object
Example
{ "status": "PROCESSING"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Request Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Authentication Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Unauthorized Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Resource Not Found Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Timeout Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Gateway Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Version 2 · commit 0771262
