Class UploadTokensApi


  • public class UploadTokensApi
    extends Object
    • Constructor Detail

      • UploadTokensApi

        public UploadTokensApi​(ApiClient apiClient)
      • UploadTokensApi

        public UploadTokensApi()
        Constructor for UploadTokensApi production environment where API key is not required.
      • UploadTokensApi

        public UploadTokensApi​(String basePath)
        Constructor for UploadTokensApi 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.
      • UploadTokensApi

        public UploadTokensApi​(String apiKey,
                               String basePath)
        Constructor for UploadTokensApi with custom API base path
        Parameters:
        apiKey - the api key to use to authenticate to the API
        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)
      • deleteToken

        public void deleteToken​(String uploadToken)
                         throws ApiException
        Delete an upload token Delete an existing upload token. This is especially useful for tokens you may have created that do not expire.
        Parameters:
        uploadToken - The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. (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 -
      • deleteTokenWithHttpInfo

        public ApiResponse<Void> deleteTokenWithHttpInfo​(String uploadToken)
                                                  throws ApiException
        Delete an upload token Delete an existing upload token. This is especially useful for tokens you may have created that do not expire.
        Parameters:
        uploadToken - The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. (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 -
      • list

        public UploadTokensApi.APIlistRequest list()
        List all active upload tokens. A delegated token is used to allow secure uploads without exposing your API key. Use this endpoint to retrieve a list of all currently active delegated tokens. Tutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload).
        Returns:
        APIlistRequest
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
      • getToken

        public UploadToken getToken​(String uploadToken)
                             throws ApiException
        Show upload token You can retrieve details about a specific upload token if you have the unique identifier for the upload token. Add it in the path of the endpoint. Details include time-to-live (ttl), when the token was created, and when it will expire.
        Parameters:
        uploadToken - The unique identifier for the token you want information about. (required)
        Returns:
        UploadToken
        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 -
      • getTokenWithHttpInfo

        public ApiResponse<UploadToken> getTokenWithHttpInfo​(String uploadToken)
                                                      throws ApiException
        Show upload token You can retrieve details about a specific upload token if you have the unique identifier for the upload token. Add it in the path of the endpoint. Details include time-to-live (ttl), when the token was created, and when it will expire.
        Parameters:
        uploadToken - The unique identifier for the token you want information about. (required)
        Returns:
        ApiResponse<UploadToken>
        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 -
      • createToken

        public UploadToken createToken​(TokenCreationPayload tokenCreationPayload)
                                throws ApiException
        Generate an upload token Use this endpoint to generate an upload token. You can use this token to authenticate video uploads while keeping your API key safe. Tutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload).
        Parameters:
        tokenCreationPayload - (required)
        Returns:
        UploadToken
        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 -
      • createTokenWithHttpInfo

        public ApiResponse<UploadToken> createTokenWithHttpInfo​(TokenCreationPayload tokenCreationPayload)
                                                         throws ApiException
        Generate an upload token Use this endpoint to generate an upload token. You can use this token to authenticate video uploads while keeping your API key safe. Tutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload).
        Parameters:
        tokenCreationPayload - (required)
        Returns:
        ApiResponse<UploadToken>
        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 -