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.APIlistRequest
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Videocreate(VideoCreationPayload videoCreationPayload)Create a video To create a video, you create its metadata first, before adding the video file (exception - when using an existing HTTP source).ApiResponse<Video>createWithHttpInfo(VideoCreationPayload videoCreationPayload)Create a video To create a video, you create its metadata first, before adding the video file (exception - when using an existing HTTP source).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.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>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)
-
-
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 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 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 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 -
-
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 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 To create a video, you create its metadata first, before adding the video file (exception - when using an existing HTTP source). * Videos are public by default. [Learn about Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * Up to 6 responsive video streams will be created (from 240p to 4k) * Mp4 encoded versions are created at the highest quality (max 1080p) by default. * Panoramic videos are for videos recorded in 360 degrees. You can toggle this after your 360 video upload. * Searchable parameters: title, description, tags and metadata ```shell $ curl https://ws.api.video/videos \\ -H 'Authorization: Bearer {access_token} \\ -d '{\"title\":\"My video\", \"description\":\"so many details\", \"mp4Support\":true }' ``` ### add an URL to upload on creation You can also create a video directly from a video hosted on a third-party server by giving its URI in `source` parameter: ```shell $ curl https://ws.api.video/videos \\ -H 'Authorization: Bearer {access_token} \\ -d '{\"source\":\"http://uri/to/video.mp4\", \"title\":\"My video\"}' ``` In this case, the service will respond `202 Accepted` and download the video asynchronously. ### Track users with Dynamic Metadata Metadata values can be a key:value where the values are predefined, but Dynamic metadata allows you to enter *any* value for a defined key. To defined a dynamic metadata pair use: ``` \"metadata\":[{\"dynamicKey\": \"__dynamicKey__\"}] ``` The double underscore on both sides of the value allows any variable to be added for a given video session. Added the the url you might have: ``` <iframe type=\"text/html\" src=\"https://embed.api.video/vod/vi6QvU9dhYCzW3BpPvPsZUa8?metadata[classUserName]=Doug\" width=\"960\" height=\"320\" frameborder=\"0\" scrollling=\"no\"></iframe> ``` This video session will be tagged as watched by Doug - allowing for in-depth analysis on how each viewer interacts with the videos. 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 To create a video, you create its metadata first, before adding the video file (exception - when using an existing HTTP source). * Videos are public by default. [Learn about Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * Up to 6 responsive video streams will be created (from 240p to 4k) * Mp4 encoded versions are created at the highest quality (max 1080p) by default. * Panoramic videos are for videos recorded in 360 degrees. You can toggle this after your 360 video upload. * Searchable parameters: title, description, tags and metadata ```shell $ curl https://ws.api.video/videos \\ -H 'Authorization: Bearer {access_token} \\ -d '{\"title\":\"My video\", \"description\":\"so many details\", \"mp4Support\":true }' ``` ### add an URL to upload on creation You can also create a video directly from a video hosted on a third-party server by giving its URI in `source` parameter: ```shell $ curl https://ws.api.video/videos \\ -H 'Authorization: Bearer {access_token} \\ -d '{\"source\":\"http://uri/to/video.mp4\", \"title\":\"My video\"}' ``` In this case, the service will respond `202 Accepted` and download the video asynchronously. ### Track users with Dynamic Metadata Metadata values can be a key:value where the values are predefined, but Dynamic metadata allows you to enter *any* value for a defined key. To defined a dynamic metadata pair use: ``` \"metadata\":[{\"dynamicKey\": \"__dynamicKey__\"}] ``` The double underscore on both sides of the value allows any variable to be added for a given video session. Added the the url you might have: ``` <iframe type=\"text/html\" src=\"https://embed.api.video/vod/vi6QvU9dhYCzW3BpPvPsZUa8?metadata[classUserName]=Doug\" width=\"960\" height=\"320\" frameborder=\"0\" scrollling=\"no\"></iframe> ``` This video session will be tagged as watched by Doug - allowing for in-depth analysis on how each viewer interacts with the videos. 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. ```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. ```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. ```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 -
-
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. ```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 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 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 -
-
-