Class VideosApi

java.lang.Object
video.api.client.api.clients.VideosApi

public class VideosApi
extends java.lang.Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    class  VideosApi.APIlistRequest  
  • Constructor Summary

    Constructors
    Constructor Description
    VideosApi​(ApiClient apiClient)  
  • Method Summary

    Modifier and Type Method Description
    Video create​(VideoCreatePayload videoCreatePayload)
    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​(VideoCreatePayload videoCreatePayload)
    Create a video To create a video, you create its metadata first, before adding the video file (exception - when using an existing HTTP source).
    void delete​(java.lang.String videoId)
    Delete a video If you do not need a video any longer, you can send a request to delete it.
    ApiResponse<java.lang.Void> deleteWithHttpInfo​(java.lang.String videoId)
    Delete a video If you do not need a video any longer, you can send a request to delete it.
    Video get​(java.lang.String videoId)
    Show a video This call provides the same JSON information provided on video creation.
    ApiClient getApiClient()  
    Videostatus getStatus​(java.lang.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​(java.lang.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​(java.lang.String videoId)
    Show a video This call provides the same JSON information provided on video creation.
    VideosApi.APIlistRequest list()
    List all videos Requests to this endpoint return a list of your videos (with all their details).
    Video pickThumbnail​(java.lang.String videoId, VideoThumbnailPickPayload videoThumbnailPickPayload)
    Pick a thumbnail Pick a thumbnail from the given time code.
    ApiResponse<Video> pickThumbnailWithHttpInfo​(java.lang.String videoId, VideoThumbnailPickPayload videoThumbnailPickPayload)
    Pick a thumbnail Pick a thumbnail from the given time code.
    void setApiClient​(ApiClient apiClient)  
    Video update​(java.lang.String videoId, VideoUpdatePayload videoUpdatePayload)
    Update a video Use this endpoint to update the parameters associated with your video.
    ApiResponse<Video> updateWithHttpInfo​(java.lang.String videoId, VideoUpdatePayload videoUpdatePayload)
    Update a video Use this endpoint to update the parameters associated with your video.
    Video upload​(java.lang.String videoId, java.io.File file)
    Upload a video To upload a video to the videoId you created.
    Video upload​(java.lang.String videoId, java.io.File file, UploadProgressListener uploadProgressListener)
    Upload a video To upload a video to the videoId you created.
    Video uploadThumbnail​(java.lang.String videoId, java.io.File file)
    Upload a thumbnail In creating a thumbnail, you may either upload an image, or you can pick a time in the video to be used as thumbnail.
    ApiResponse<Video> uploadThumbnailWithHttpInfo​(java.lang.String videoId, java.io.File file)
    Upload a thumbnail In creating a thumbnail, you may either upload an image, or you can pick a time in the video to be used as thumbnail.
    ApiResponse<Video> uploadWithHttpInfo​(java.lang.String videoId, java.io.File file)
    Upload a video To upload a video to the videoId you created.
    ApiResponse<Video> uploadWithHttpInfo​(java.lang.String videoId, java.io.File file, UploadProgressListener uploadProgressListener)
    Upload a video To upload a video to the videoId you created.
    Video uploadWithUploadToken​(java.lang.String token, java.io.File file)
    Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?
    Video uploadWithUploadToken​(java.lang.String token, java.io.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?
    ApiResponse<Video> uploadWithUploadTokenWithHttpInfo​(java.lang.String token, java.io.File file)
    Upload with an upload token When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?
    ApiResponse<Video> uploadWithUploadTokenWithHttpInfo​(java.lang.String token, java.io.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?

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VideosApi

      public VideosApi​(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient​(ApiClient apiClient)
    • delete

      public void delete​(java.lang.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.
      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<java.lang.Void> deleteWithHttpInfo​(java.lang.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.
      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​(java.lang.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.
      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​(java.lang.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.
      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​(java.lang.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.
      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​(java.lang.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.
      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.
      Returns:
      APIlistRequest
      Http Response Details:
      Status Code Description Response Headers
      200 Success -
      400 Bad Request -
    • update

      public Video update​(java.lang.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.
      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​(java.lang.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.
      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​(java.lang.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.
      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​(java.lang.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.
      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​(java.lang.String token, java.io.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​(java.lang.String token, java.io.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​(java.lang.String token, java.io.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​(java.lang.String token, java.io.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​(VideoCreatePayload videoCreatePayload) 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. Mp4 encoded versions are created at the highest quality (max 1080p) by default. ```shell $ curl https://ws.api.video/videos \\ -H 'Authorization: Bearer {access_token} \\ -d '{\"title\":\"My video\", \"description\":\"so many details\", \"mp4Support\":true }' ``` ### Creating a hosted video You can also create a video directly from one 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. 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)
      Parameters:
      videoCreatePayload - 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​(VideoCreatePayload videoCreatePayload) 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. Mp4 encoded versions are created at the highest quality (max 1080p) by default. ```shell $ curl https://ws.api.video/videos \\ -H 'Authorization: Bearer {access_token} \\ -d '{\"title\":\"My video\", \"description\":\"so many details\", \"mp4Support\":true }' ``` ### Creating a hosted video You can also create a video directly from one 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. 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)
      Parameters:
      videoCreatePayload - 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​(java.lang.String videoId, java.io.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 ```
      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​(java.lang.String videoId, java.io.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 ```
      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​(java.lang.String videoId, java.io.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 ```
      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​(java.lang.String videoId, java.io.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 ```
      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​(java.lang.String videoId, java.io.File file) throws ApiException
      Upload a thumbnail In creating a thumbnail, you may either upload an image, or you can pick a time in the video to be used as thumbnail. This endpoint is for uploading an image. Use [Pick a Thumbnail](https://docs.api.video/reference#patch_videos-videoid-thumbnail) to pick a time in the video. There may be a short delay before the new thumbnail is delivered to our CDN.
      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​(java.lang.String videoId, java.io.File file) throws ApiException
      Upload a thumbnail In creating a thumbnail, you may either upload an image, or you can pick a time in the video to be used as thumbnail. This endpoint is for uploading an image. Use [Pick a Thumbnail](https://docs.api.video/reference#patch_videos-videoid-thumbnail) to pick a time in the video. There may be a short delay before the new thumbnail is delivered to our CDN.
      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 -