Package video.api.client.api.clients
Class VideosApi
- java.lang.Object
-
- video.api.client.api.clients.VideosApi
-
public class VideosApi extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classVideosApi.APIlistRequestclassVideosApi.UploadProgressiveSessionclassVideosApi.UploadWithUploadTokenProgressiveSession
-
Constructor Summary
Constructors Constructor Description VideosApi()Constructor for VideosApi production environment where API key is not required.VideosApi(String basePath)Constructor for VideosApi with custom API base path where API key is not required.VideosApi(String apiKey, String basePath)Constructor for VideosApi with custom API base pathVideosApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Videocreate(VideoCreationPayload videoCreationPayload)Create a video ## We have tutorials on: * [Creating and uploading videos](https://api.video/blog/tutorials/video-upload-tutorial) * [Uploading large videos](https://api.video/blog/tutorials/video-upload-tutorial-large-videos) * [Using tags with videos](https://api.video/blog/tutorials/video-tagging-best-practices) * [Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * [Using Dynamic Metadata](https://api.video/blog/tutorials/dynamic-metadata) * Full list of [tutorials](https://api.video/blog/endpoints/video-create) that demonstrate this endpoint.VideosApi.UploadProgressiveSessioncreateUploadProgressiveSession(String videoId)VideosApi.UploadWithUploadTokenProgressiveSessioncreateUploadWithUploadTokenProgressiveSession(String token)ApiResponse<Video>createWithHttpInfo(VideoCreationPayload videoCreationPayload)Create a video ## We have tutorials on: * [Creating and uploading videos](https://api.video/blog/tutorials/video-upload-tutorial) * [Uploading large videos](https://api.video/blog/tutorials/video-upload-tutorial-large-videos) * [Using tags with videos](https://api.video/blog/tutorials/video-tagging-best-practices) * [Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * [Using Dynamic Metadata](https://api.video/blog/tutorials/dynamic-metadata) * Full list of [tutorials](https://api.video/blog/endpoints/video-create) that demonstrate this endpoint.voiddelete(String videoId)Delete a video If you do not need a video any longer, you can send a request to delete it.ApiResponse<Void>deleteWithHttpInfo(String videoId)Delete a video If you do not need a video any longer, you can send a request to delete it.Videoget(String videoId)Show a video This call provides the same JSON information provided on video creation.ApiClientgetApiClient()VideoStatusgetStatus(String videoId)Show video status This API provides upload status & encoding status to determine when the video is uploaded or ready to playback.ApiResponse<VideoStatus>getStatusWithHttpInfo(String videoId)Show video status This API provides upload status & encoding status to determine when the video is uploaded or ready to playback.ApiResponse<Video>getWithHttpInfo(String videoId)Show a video This call provides the same JSON information provided on video creation.VideosApi.APIlistRequestlist()List all videos Requests to this endpoint return a list of your videos (with all their details).VideopickThumbnail(String videoId, VideoThumbnailPickPayload videoThumbnailPickPayload)Pick a thumbnail Pick a thumbnail from the given time code.ApiResponse<Video>pickThumbnailWithHttpInfo(String videoId, VideoThumbnailPickPayload videoThumbnailPickPayload)Pick a thumbnail Pick a thumbnail from the given time code.voidsetApiClient(ApiClient apiClient)Videoupdate(String videoId, VideoUpdatePayload videoUpdatePayload)Update a video Use this endpoint to update the parameters associated with your video.ApiResponse<Video>updateWithHttpInfo(String videoId, VideoUpdatePayload videoUpdatePayload)Update a video Use this endpoint to update the parameters associated with your video.Videoupload(String videoId, File file)Upload a video To upload a video to the videoId you created.Videoupload(String videoId, File file, UploadProgressListener uploadProgressListener)Upload a video To upload a video to the videoId you created.ApiResponse<Video>uploadPartWithHttpInfo(String videoId, File file, Integer part, boolean isLast, UploadPartProgressListener uploadProgressListener)VideouploadThumbnail(String videoId, File file)Upload a thumbnail The thumbnail is the poster that appears in the player window before video playback begins.ApiResponse<Video>uploadThumbnailWithHttpInfo(String videoId, File file)Upload a thumbnail The thumbnail is the poster that appears in the player window before video playback begins.ApiResponse<Video>uploadWithHttpInfo(String videoId, File file)Upload a video To upload a video to the videoId you created.ApiResponse<Video>uploadWithHttpInfo(String videoId, File file, UploadProgressListener uploadProgressListener)Upload a video To upload a video to the videoId you created.VideouploadWithUploadToken(String token, File file)Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`.VideouploadWithUploadToken(String token, File file, UploadProgressListener uploadProgressListener)Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`.ApiResponse<Video>uploadWithUploadTokenPartWithHttpInfo(String token, File file, String videoId, Integer part, boolean isLast, UploadPartProgressListener uploadProgressListener)ApiResponse<Video>uploadWithUploadTokenWithHttpInfo(String token, File file)Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`.ApiResponse<Video>uploadWithUploadTokenWithHttpInfo(String token, File file, UploadProgressListener uploadProgressListener)Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`.
-
-
-
Constructor Detail
-
VideosApi
public VideosApi(ApiClient apiClient)
-
VideosApi
public VideosApi()
Constructor for VideosApi production environment where API key is not required.
-
VideosApi
public VideosApi(String basePath)
Constructor for VideosApi with custom API base path where API key is not required.- Parameters:
basePath- the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
delete
public void delete(String videoId) throws ApiException
Delete a video If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. Tutorials using [video deletion](https://api.video/blog/endpoints/video-delete).- Parameters:
videoId- The video ID for the video you want to delete. (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content - 404 Not Found -
-
deleteWithHttpInfo
public ApiResponse<Void> deleteWithHttpInfo(String videoId) throws ApiException
Delete a video If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. Tutorials using [video deletion](https://api.video/blog/endpoints/video-delete).- Parameters:
videoId- The video ID for the video you want to delete. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content - 404 Not Found -
-
get
public Video get(String videoId) throws ApiException
Show a video This call provides the same JSON information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL. Tutorials using [video GET](https://api.video/blog/endpoints/video-get).- Parameters:
videoId- The unique identifier for the video you want details about. (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
getWithHttpInfo
public ApiResponse<Video> getWithHttpInfo(String videoId) throws ApiException
Show a video This call provides the same JSON information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL. Tutorials using [video GET](https://api.video/blog/endpoints/video-get).- Parameters:
videoId- The unique identifier for the video you want details about. (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
getStatus
public VideoStatus getStatus(String videoId) throws ApiException
Show video status This API provides upload status & encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities. Tutorials using [video status](https://api.video/blog/endpoints/video-status).- Parameters:
videoId- The unique identifier for the video you want the status for. (required)- Returns:
- VideoStatus
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
getStatusWithHttpInfo
public ApiResponse<VideoStatus> getStatusWithHttpInfo(String videoId) throws ApiException
Show video status This API provides upload status & encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities. Tutorials using [video status](https://api.video/blog/endpoints/video-status).- Parameters:
videoId- The unique identifier for the video you want the status for. (required)- Returns:
- ApiResponse<VideoStatus>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
list
public VideosApi.APIlistRequest list()
List all videos Requests to this endpoint return a list of your videos (with all their details). With no parameters added to this query, the API returns all videos. You can filter what videos the API returns using the parameters described below. We have [several tutorials](https://api.video/blog/endpoints/video-list) that demonstrate this endpoint.- Returns:
- APIlistRequest
- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request -
-
update
public Video update(String videoId, VideoUpdatePayload videoUpdatePayload) throws ApiException
Update a video Use this endpoint to update the parameters associated with your video. The video you are updating is determined by the video ID you provide in the path. For each parameter you want to update, include the update in the request body. NOTE: If you are updating an array, you must provide the entire array as what you provide here overwrites what is in the system rather than appending to it. Tutorials using [video update](https://api.video/blog/endpoints/video-update).- Parameters:
videoId- The video ID for the video you want to delete. (required)videoUpdatePayload- (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
updateWithHttpInfo
public ApiResponse<Video> updateWithHttpInfo(String videoId, VideoUpdatePayload videoUpdatePayload) throws ApiException
Update a video Use this endpoint to update the parameters associated with your video. The video you are updating is determined by the video ID you provide in the path. For each parameter you want to update, include the update in the request body. NOTE: If you are updating an array, you must provide the entire array as what you provide here overwrites what is in the system rather than appending to it. Tutorials using [video update](https://api.video/blog/endpoints/video-update).- Parameters:
videoId- The video ID for the video you want to delete. (required)videoUpdatePayload- (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
pickThumbnail
public Video pickThumbnail(String videoId, VideoThumbnailPickPayload videoThumbnailPickPayload) throws ApiException
Pick a thumbnail Pick a thumbnail from the given time code. If you'd like to upload an image for your thumbnail, use the [Upload a Thumbnail](https://docs.api.video/reference#post_videos-videoid-thumbnail) endpoint. There may be a short delay for the thumbnail to update. Tutorials using [Thumbnail picking](https://api.video/blog/endpoints/video-pick-a-thumbnail).- Parameters:
videoId- Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail. (required)videoThumbnailPickPayload- (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
pickThumbnailWithHttpInfo
public ApiResponse<Video> pickThumbnailWithHttpInfo(String videoId, VideoThumbnailPickPayload videoThumbnailPickPayload) throws ApiException
Pick a thumbnail Pick a thumbnail from the given time code. If you'd like to upload an image for your thumbnail, use the [Upload a Thumbnail](https://docs.api.video/reference#post_videos-videoid-thumbnail) endpoint. There may be a short delay for the thumbnail to update. Tutorials using [Thumbnail picking](https://api.video/blog/endpoints/video-pick-a-thumbnail).- Parameters:
videoId- Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail. (required)videoThumbnailPickPayload- (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
uploadWithUploadToken
public Video uploadWithUploadToken(String token, File file) throws ApiException
Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`. Example with cURL: ```curl $ curl --request POST --url 'https://ws.api.video/upload?token=toXXX' --header 'content-type: multipart/form-data' -F file=@video.mp4 ``` Or in an HTML form, with a little JavaScript to convert the form into JSON: ```html <!--form for user interaction--> <form name=\"videoUploadForm\" > <label for=video>Video:</label> <input type=file name=source/><br/> <input value=\"Submit\" type=\"submit\"> </form> <div></div> <!--JS takes the form data uses FormData to turn the response into JSON. then uses POST to upload the video file. Update the token parameter in the url to your upload token. --> <script> var form = document.forms.namedItem(\"videoUploadForm\"); form.addEventListener('submit', function(ev) { ev.preventDefault(); var oOutput = document.querySelector(\"div\"), oData = new FormData(form); var oReq = new XMLHttpRequest(); oReq.open(\"POST\", \"https://ws.api.video/upload?token=toXXX\", true); oReq.send(oData); oReq.onload = function(oEvent) { if (oReq.status ==201) { oOutput.innerHTML = \"Your video is uploaded!<br/>\" + oReq.response; } else { oOutput.innerHTML = \"Error \" + oReq.status + \" occurred when trying to upload your file.<br />\"; } }; }, false); </script> ``` ### Dealing with large files You can upload large files on api.video with <a href='https://docs.api.video/reference/post_videos-videoid-source'>Progressive Upload</a>. Alternatively, if you want to use regular upload, we have created a <a href='https://api.video/blog/tutorials/uploading-large-files-with-javascript'>tutorial</a> to walk through the steps required.- Parameters:
token- The unique identifier for the token you want to use to upload a video. (required)file- The path to the video you want to upload. (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request -
-
uploadWithUploadToken
public Video uploadWithUploadToken(String token, File file, UploadProgressListener uploadProgressListener) throws ApiException
Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`. Example with cURL: ```curl $ curl --request POST --url 'https://ws.api.video/upload?token=toXXX' --header 'content-type: multipart/form-data' -F file=@video.mp4 ``` Or in an HTML form, with a little JavaScript to convert the form into JSON: ```html <!--form for user interaction--> <form name=\"videoUploadForm\" > <label for=video>Video:</label> <input type=file name=source/><br/> <input value=\"Submit\" type=\"submit\"> </form> <div></div> <!--JS takes the form data uses FormData to turn the response into JSON. then uses POST to upload the video file. Update the token parameter in the url to your upload token. --> <script> var form = document.forms.namedItem(\"videoUploadForm\"); form.addEventListener('submit', function(ev) { ev.preventDefault(); var oOutput = document.querySelector(\"div\"), oData = new FormData(form); var oReq = new XMLHttpRequest(); oReq.open(\"POST\", \"https://ws.api.video/upload?token=toXXX\", true); oReq.send(oData); oReq.onload = function(oEvent) { if (oReq.status ==201) { oOutput.innerHTML = \"Your video is uploaded!<br/>\" + oReq.response; } else { oOutput.innerHTML = \"Error \" + oReq.status + \" occurred when trying to upload your file.<br />\"; } }; }, false); </script> ``` ### Dealing with large files You can upload large files on api.video with <a href='https://docs.api.video/reference/post_videos-videoid-source'>Progressive Upload</a>. Alternatively, if you want to use regular upload, we have created a <a href='https://api.video/blog/tutorials/uploading-large-files-with-javascript'>tutorial</a> to walk through the steps required.- Parameters:
token- The unique identifier for the token you want to use to upload a video. (required)file- The path to the video you want to upload. (required)uploadProgressListener- An upload progress listener- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request -
-
uploadWithUploadTokenWithHttpInfo
public ApiResponse<Video> uploadWithUploadTokenWithHttpInfo(String token, File file) throws ApiException
Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`. Example with cURL: ```curl $ curl --request POST --url 'https://ws.api.video/upload?token=toXXX' --header 'content-type: multipart/form-data' -F file=@video.mp4 ``` Or in an HTML form, with a little JavaScript to convert the form into JSON: ```html <!--form for user interaction--> <form name=\"videoUploadForm\" > <label for=video>Video:</label> <input type=file name=source/><br/> <input value=\"Submit\" type=\"submit\"> </form> <div></div> <!--JS takes the form data uses FormData to turn the response into JSON. then uses POST to upload the video file. Update the token parameter in the url to your upload token. --> <script> var form = document.forms.namedItem(\"videoUploadForm\"); form.addEventListener('submit', function(ev) { ev.preventDefault(); var oOutput = document.querySelector(\"div\"), oData = new FormData(form); var oReq = new XMLHttpRequest(); oReq.open(\"POST\", \"https://ws.api.video/upload?token=toXXX\", true); oReq.send(oData); oReq.onload = function(oEvent) { if (oReq.status ==201) { oOutput.innerHTML = \"Your video is uploaded!<br/>\" + oReq.response; } else { oOutput.innerHTML = \"Error \" + oReq.status + \" occurred when trying to upload your file.<br />\"; } }; }, false); </script> ``` ### Dealing with large files You can upload large files on api.video with <a href='https://docs.api.video/reference/post_videos-videoid-source'>Progressive Upload</a>. Alternatively, if you want to use regular upload, we have created a <a href='https://api.video/blog/tutorials/uploading-large-files-with-javascript'>tutorial</a> to walk through the steps required.- Parameters:
token- The unique identifier for the token you want to use to upload a video. (required)file- The path to the video you want to upload. (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request -
-
uploadWithUploadTokenPartWithHttpInfo
public ApiResponse<Video> uploadWithUploadTokenPartWithHttpInfo(String token, File file, String videoId, Integer part, boolean isLast, UploadPartProgressListener uploadProgressListener) throws ApiException
- Throws:
ApiException
-
createUploadWithUploadTokenProgressiveSession
public VideosApi.UploadWithUploadTokenProgressiveSession createUploadWithUploadTokenProgressiveSession(String token)
-
uploadWithUploadTokenWithHttpInfo
public ApiResponse<Video> uploadWithUploadTokenWithHttpInfo(String token, File file, UploadProgressListener uploadProgressListener) throws ApiException
Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=<tokenId>`. Example with cURL: ```curl $ curl --request POST --url 'https://ws.api.video/upload?token=toXXX' --header 'content-type: multipart/form-data' -F file=@video.mp4 ``` Or in an HTML form, with a little JavaScript to convert the form into JSON: ```html <!--form for user interaction--> <form name=\"videoUploadForm\" > <label for=video>Video:</label> <input type=file name=source/><br/> <input value=\"Submit\" type=\"submit\"> </form> <div></div> <!--JS takes the form data uses FormData to turn the response into JSON. then uses POST to upload the video file. Update the token parameter in the url to your upload token. --> <script> var form = document.forms.namedItem(\"videoUploadForm\"); form.addEventListener('submit', function(ev) { ev.preventDefault(); var oOutput = document.querySelector(\"div\"), oData = new FormData(form); var oReq = new XMLHttpRequest(); oReq.open(\"POST\", \"https://ws.api.video/upload?token=toXXX\", true); oReq.send(oData); oReq.onload = function(oEvent) { if (oReq.status ==201) { oOutput.innerHTML = \"Your video is uploaded!<br/>\" + oReq.response; } else { oOutput.innerHTML = \"Error \" + oReq.status + \" occurred when trying to upload your file.<br />\"; } }; }, false); </script> ``` ### Dealing with large files You can upload large files on api.video with <a href='https://docs.api.video/reference/post_videos-videoid-source'>Progressive Upload</a>. Alternatively, if you want to use regular upload, we have created a <a href='https://api.video/blog/tutorials/uploading-large-files-with-javascript'>tutorial</a> to walk through the steps required.- Parameters:
token- The unique identifier for the token you want to use to upload a video. (required)file- The path to the video you want to upload. (required)uploadProgressListener- An upload progress listener- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request -
-
create
public Video create(VideoCreationPayload videoCreationPayload) throws ApiException
Create a video ## We have tutorials on: * [Creating and uploading videos](https://api.video/blog/tutorials/video-upload-tutorial) * [Uploading large videos](https://api.video/blog/tutorials/video-upload-tutorial-large-videos) * [Using tags with videos](https://api.video/blog/tutorials/video-tagging-best-practices) * [Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * [Using Dynamic Metadata](https://api.video/blog/tutorials/dynamic-metadata) * Full list of [tutorials](https://api.video/blog/endpoints/video-create) that demonstrate this endpoint.- Parameters:
videoCreationPayload- video to create (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 202 Accepted - 400 Bad Request -
-
createWithHttpInfo
public ApiResponse<Video> createWithHttpInfo(VideoCreationPayload videoCreationPayload) throws ApiException
Create a video ## We have tutorials on: * [Creating and uploading videos](https://api.video/blog/tutorials/video-upload-tutorial) * [Uploading large videos](https://api.video/blog/tutorials/video-upload-tutorial-large-videos) * [Using tags with videos](https://api.video/blog/tutorials/video-tagging-best-practices) * [Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * [Using Dynamic Metadata](https://api.video/blog/tutorials/dynamic-metadata) * Full list of [tutorials](https://api.video/blog/endpoints/video-create) that demonstrate this endpoint.- Parameters:
videoCreationPayload- video to create (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 202 Accepted - 400 Bad Request -
-
upload
public Video upload(String videoId, File file) throws ApiException
Upload a video To upload a video to the videoId you created. Replace {videoId} with the id you'd like to use, {access_token} with your token, and /path/to/video.mp4 with the path to the video you'd like to upload. You can only upload your video to the videoId once. We offer 2 types of upload: * Regular upload * Progressive upload The latter allows you to split a video source into X chunks and send those chunks independently (concurrently or sequentially). The 2 main goals for our users are to * allow the upload of video sources > 200 MiB (200 MiB = the max. allowed file size for regular upload) * allow to send a video source \"progressively\", i.e., before before knowing the total size of the video. Once all chunks have been sent, they are reaggregated to one source file. The video source is considered as \"completely sent\" when the \"last\" chunk is sent (i.e., the chunk that \"completes\" the upload). ```bash curl https://ws.api.video/videos/{videoId}/source \\ -H 'Authorization: Bearer {access_token}' \\ -F file=@/path/to/video.mp4 ``` Tutorials using [video upload](https://api.video/blog/endpoints/video-upload).- Parameters:
videoId- Enter the videoId you want to use to upload your video. (required)file- The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request - 404 Not Found -
-
upload
public Video upload(String videoId, File file, UploadProgressListener uploadProgressListener) throws ApiException
Upload a video To upload a video to the videoId you created. Replace {videoId} with the id you'd like to use, {access_token} with your token, and /path/to/video.mp4 with the path to the video you'd like to upload. You can only upload your video to the videoId once. We offer 2 types of upload: * Regular upload * Progressive upload The latter allows you to split a video source into X chunks and send those chunks independently (concurrently or sequentially). The 2 main goals for our users are to * allow the upload of video sources > 200 MiB (200 MiB = the max. allowed file size for regular upload) * allow to send a video source \"progressively\", i.e., before before knowing the total size of the video. Once all chunks have been sent, they are reaggregated to one source file. The video source is considered as \"completely sent\" when the \"last\" chunk is sent (i.e., the chunk that \"completes\" the upload). ```bash curl https://ws.api.video/videos/{videoId}/source \\ -H 'Authorization: Bearer {access_token}' \\ -F file=@/path/to/video.mp4 ``` Tutorials using [video upload](https://api.video/blog/endpoints/video-upload).- Parameters:
videoId- Enter the videoId you want to use to upload your video. (required)file- The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. (required)uploadProgressListener- An upload progress listener- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request - 404 Not Found -
-
uploadWithHttpInfo
public ApiResponse<Video> uploadWithHttpInfo(String videoId, File file) throws ApiException
Upload a video To upload a video to the videoId you created. Replace {videoId} with the id you'd like to use, {access_token} with your token, and /path/to/video.mp4 with the path to the video you'd like to upload. You can only upload your video to the videoId once. We offer 2 types of upload: * Regular upload * Progressive upload The latter allows you to split a video source into X chunks and send those chunks independently (concurrently or sequentially). The 2 main goals for our users are to * allow the upload of video sources > 200 MiB (200 MiB = the max. allowed file size for regular upload) * allow to send a video source \"progressively\", i.e., before before knowing the total size of the video. Once all chunks have been sent, they are reaggregated to one source file. The video source is considered as \"completely sent\" when the \"last\" chunk is sent (i.e., the chunk that \"completes\" the upload). ```bash curl https://ws.api.video/videos/{videoId}/source \\ -H 'Authorization: Bearer {access_token}' \\ -F file=@/path/to/video.mp4 ``` Tutorials using [video upload](https://api.video/blog/endpoints/video-upload).- Parameters:
videoId- Enter the videoId you want to use to upload your video. (required)file- The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request - 404 Not Found -
-
uploadPartWithHttpInfo
public ApiResponse<Video> uploadPartWithHttpInfo(String videoId, File file, Integer part, boolean isLast, UploadPartProgressListener uploadProgressListener) throws ApiException
- Throws:
ApiException
-
createUploadProgressiveSession
public VideosApi.UploadProgressiveSession createUploadProgressiveSession(String videoId)
-
uploadWithHttpInfo
public ApiResponse<Video> uploadWithHttpInfo(String videoId, File file, UploadProgressListener uploadProgressListener) throws ApiException
Upload a video To upload a video to the videoId you created. Replace {videoId} with the id you'd like to use, {access_token} with your token, and /path/to/video.mp4 with the path to the video you'd like to upload. You can only upload your video to the videoId once. We offer 2 types of upload: * Regular upload * Progressive upload The latter allows you to split a video source into X chunks and send those chunks independently (concurrently or sequentially). The 2 main goals for our users are to * allow the upload of video sources > 200 MiB (200 MiB = the max. allowed file size for regular upload) * allow to send a video source \"progressively\", i.e., before before knowing the total size of the video. Once all chunks have been sent, they are reaggregated to one source file. The video source is considered as \"completely sent\" when the \"last\" chunk is sent (i.e., the chunk that \"completes\" the upload). ```bash curl https://ws.api.video/videos/{videoId}/source \\ -H 'Authorization: Bearer {access_token}' \\ -F file=@/path/to/video.mp4 ``` Tutorials using [video upload](https://api.video/blog/endpoints/video-upload).- Parameters:
videoId- Enter the videoId you want to use to upload your video. (required)file- The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. (required)uploadProgressListener- An upload progress listener- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request - 404 Not Found -
-
uploadThumbnail
public Video uploadThumbnail(String videoId, File file) throws ApiException
Upload a thumbnail The thumbnail is the poster that appears in the player window before video playback begins. This endpoint allows you to upload an image for the thumbnail. To select a still frame from the video using a time stamp, use [Pick a Thumbnail](https://docs.api.video/reference#patch_videos-videoid-thumbnail) to pick a time in the video. Note: There may be a short delay before the new thumbnail is delivered to our CDN. Tutorials using [Thumbnail upload](https://api.video/blog/endpoints/videos-upload-a-thumbnail).- Parameters:
videoId- Unique identifier of the chosen video (required)file- The .jpg image to be added as a thumbnail. (required)- Returns:
- Video
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
uploadThumbnailWithHttpInfo
public ApiResponse<Video> uploadThumbnailWithHttpInfo(String videoId, File file) throws ApiException
Upload a thumbnail The thumbnail is the poster that appears in the player window before video playback begins. This endpoint allows you to upload an image for the thumbnail. To select a still frame from the video using a time stamp, use [Pick a Thumbnail](https://docs.api.video/reference#patch_videos-videoid-thumbnail) to pick a time in the video. Note: There may be a short delay before the new thumbnail is delivered to our CDN. Tutorials using [Thumbnail upload](https://api.video/blog/endpoints/videos-upload-a-thumbnail).- Parameters:
videoId- Unique identifier of the chosen video (required)file- The .jpg image to be added as a thumbnail. (required)- Returns:
- ApiResponse<Video>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request - 404 Not Found -
-
-