Class OAuthApi

java.lang.Object
com.mypurecloud.sdk.v2.api.OAuthApi

public class OAuthApi extends Object
  • Constructor Details

    • OAuthApi

      public OAuthApi()
    • OAuthApi

      public OAuthApi(ApiClient apiClient)
  • Method Details

    • deleteOauthClient

      public void deleteOauthClient(String clientId) throws IOException, ApiException
      Delete OAuth Client
      Parameters:
      clientId - Client ID (required)
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • deleteOauthClientWithHttpInfo

      public ApiResponse<Void> deleteOauthClientWithHttpInfo(String clientId) throws IOException
      Delete OAuth Client
      Parameters:
      clientId - Client ID (required)
      Throws:
      IOException - if the request fails to be processed
    • deleteOauthClient

      public void deleteOauthClient(DeleteOauthClientRequest request) throws IOException, ApiException
      Delete OAuth Client
      Parameters:
      request - The request object
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • deleteOauthClient

      public ApiResponse<Void> deleteOauthClient(ApiRequest<Void> request) throws IOException
      Delete OAuth Client
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthAuthorization

      public OAuthAuthorization getOauthAuthorization(String clientId, String acceptLanguage) throws IOException, ApiException
      Get a client that is authorized by the resource owner
      Parameters:
      clientId - The ID of client (required)
      acceptLanguage - The language in which to display the client descriptions. (optional, default to en-us)
      Returns:
      OAuthAuthorization
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthAuthorizationWithHttpInfo

      public ApiResponse<OAuthAuthorization> getOauthAuthorizationWithHttpInfo(String clientId, String acceptLanguage) throws IOException
      Get a client that is authorized by the resource owner
      Parameters:
      clientId - The ID of client (required)
      acceptLanguage - The language in which to display the client descriptions. (optional, default to en-us)
      Returns:
      OAuthAuthorization
      Throws:
      IOException - if the request fails to be processed
    • getOauthAuthorization

      public OAuthAuthorization getOauthAuthorization(GetOauthAuthorizationRequest request) throws IOException, ApiException
      Get a client that is authorized by the resource owner
      Parameters:
      request - The request object
      Returns:
      OAuthAuthorization
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthAuthorization

      public ApiResponse<OAuthAuthorization> getOauthAuthorization(ApiRequest<Void> request) throws IOException
      Get a client that is authorized by the resource owner
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthAuthorizations

      public OAuthAuthorizationListing getOauthAuthorizations(String acceptLanguage) throws IOException, ApiException
      List clients that have been authorized, requested, or revoked by the resource owner
      Parameters:
      acceptLanguage - The language in which to display the client descriptions. (optional, default to en-us)
      Returns:
      OAuthAuthorizationListing
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthAuthorizationsWithHttpInfo

      public ApiResponse<OAuthAuthorizationListing> getOauthAuthorizationsWithHttpInfo(String acceptLanguage) throws IOException
      List clients that have been authorized, requested, or revoked by the resource owner
      Parameters:
      acceptLanguage - The language in which to display the client descriptions. (optional, default to en-us)
      Returns:
      OAuthAuthorizationListing
      Throws:
      IOException - if the request fails to be processed
    • getOauthAuthorizations

      public OAuthAuthorizationListing getOauthAuthorizations(GetOauthAuthorizationsRequest request) throws IOException, ApiException
      List clients that have been authorized, requested, or revoked by the resource owner
      Parameters:
      request - The request object
      Returns:
      OAuthAuthorizationListing
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthAuthorizations

      public ApiResponse<OAuthAuthorizationListing> getOauthAuthorizations(ApiRequest<Void> request) throws IOException
      List clients that have been authorized, requested, or revoked by the resource owner
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthClient

      public OAuthClient getOauthClient(String clientId) throws IOException, ApiException
      Get OAuth Client
      Parameters:
      clientId - Client ID (required)
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClientWithHttpInfo

      public ApiResponse<OAuthClient> getOauthClientWithHttpInfo(String clientId) throws IOException
      Get OAuth Client
      Parameters:
      clientId - Client ID (required)
      Returns:
      OAuthClient
      Throws:
      IOException - if the request fails to be processed
    • getOauthClient

      public OAuthClient getOauthClient(GetOauthClientRequest request) throws IOException, ApiException
      Get OAuth Client
      Parameters:
      request - The request object
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClient

      public ApiResponse<OAuthClient> getOauthClient(ApiRequest<Void> request) throws IOException
      Get OAuth Client
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthClientUsageQueryResult

      public ApiUsageQueryResult getOauthClientUsageQueryResult(String executionId, String clientId) throws IOException, ApiException
      Get the results of a usage query
      Parameters:
      executionId - ID of the query execution (required)
      clientId - Client ID (required)
      Returns:
      ApiUsageQueryResult
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClientUsageQueryResultWithHttpInfo

      public ApiResponse<ApiUsageQueryResult> getOauthClientUsageQueryResultWithHttpInfo(String executionId, String clientId) throws IOException
      Get the results of a usage query
      Parameters:
      executionId - ID of the query execution (required)
      clientId - Client ID (required)
      Returns:
      ApiUsageQueryResult
      Throws:
      IOException - if the request fails to be processed
    • getOauthClientUsageQueryResult

      public ApiUsageQueryResult getOauthClientUsageQueryResult(GetOauthClientUsageQueryResultRequest request) throws IOException, ApiException
      Get the results of a usage query
      Parameters:
      request - The request object
      Returns:
      ApiUsageQueryResult
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClientUsageQueryResult

      public ApiResponse<ApiUsageQueryResult> getOauthClientUsageQueryResult(ApiRequest<Void> request) throws IOException
      Get the results of a usage query
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthClientUsageSummary

      public UsageExecutionResult getOauthClientUsageSummary(String clientId, String days) throws IOException, ApiException
      Get a summary of OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      clientId - Client ID (required)
      days - Previous number of days to query (optional, default to 7)
      Returns:
      UsageExecutionResult
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClientUsageSummaryWithHttpInfo

      public ApiResponse<UsageExecutionResult> getOauthClientUsageSummaryWithHttpInfo(String clientId, String days) throws IOException
      Get a summary of OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      clientId - Client ID (required)
      days - Previous number of days to query (optional, default to 7)
      Returns:
      UsageExecutionResult
      Throws:
      IOException - if the request fails to be processed
    • getOauthClientUsageSummary

      public UsageExecutionResult getOauthClientUsageSummary(GetOauthClientUsageSummaryRequest request) throws IOException, ApiException
      Get a summary of OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      request - The request object
      Returns:
      UsageExecutionResult
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClientUsageSummary

      public ApiResponse<UsageExecutionResult> getOauthClientUsageSummary(ApiRequest<Void> request) throws IOException
      Get a summary of OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthClients

      public OAuthClientEntityListing getOauthClients() throws IOException, ApiException
      The list of OAuth clients
      Returns:
      OAuthClientEntityListing
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClientsWithHttpInfo

      public ApiResponse<OAuthClientEntityListing> getOauthClientsWithHttpInfo() throws IOException
      The list of OAuth clients
      Returns:
      OAuthClientEntityListing
      Throws:
      IOException - if the request fails to be processed
    • getOauthClients

      public OAuthClientEntityListing getOauthClients(GetOauthClientsRequest request) throws IOException, ApiException
      The list of OAuth clients
      Parameters:
      request - The request object
      Returns:
      OAuthClientEntityListing
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthClients

      public ApiResponse<OAuthClientEntityListing> getOauthClients(ApiRequest<Void> request) throws IOException
      The list of OAuth clients
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthScope

      public OAuthScope getOauthScope(String scopeId, String acceptLanguage) throws IOException, ApiException
      An OAuth scope
      Parameters:
      scopeId - Scope ID (required)
      acceptLanguage - The language with which to display the scope description. (optional, default to en-us)
      Returns:
      OAuthScope
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthScopeWithHttpInfo

      public ApiResponse<OAuthScope> getOauthScopeWithHttpInfo(String scopeId, String acceptLanguage) throws IOException
      An OAuth scope
      Parameters:
      scopeId - Scope ID (required)
      acceptLanguage - The language with which to display the scope description. (optional, default to en-us)
      Returns:
      OAuthScope
      Throws:
      IOException - if the request fails to be processed
    • getOauthScope

      public OAuthScope getOauthScope(GetOauthScopeRequest request) throws IOException, ApiException
      An OAuth scope
      Parameters:
      request - The request object
      Returns:
      OAuthScope
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthScope

      public ApiResponse<OAuthScope> getOauthScope(ApiRequest<Void> request) throws IOException
      An OAuth scope
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • getOauthScopes

      public OAuthScopeListing getOauthScopes(String acceptLanguage) throws IOException, ApiException
      The list of OAuth scopes
      Parameters:
      acceptLanguage - The language with which to display the scope descriptions. (optional, default to en-us)
      Returns:
      OAuthScopeListing
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthScopesWithHttpInfo

      public ApiResponse<OAuthScopeListing> getOauthScopesWithHttpInfo(String acceptLanguage) throws IOException
      The list of OAuth scopes
      Parameters:
      acceptLanguage - The language with which to display the scope descriptions. (optional, default to en-us)
      Returns:
      OAuthScopeListing
      Throws:
      IOException - if the request fails to be processed
    • getOauthScopes

      public OAuthScopeListing getOauthScopes(GetOauthScopesRequest request) throws IOException, ApiException
      The list of OAuth scopes
      Parameters:
      request - The request object
      Returns:
      OAuthScopeListing
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • getOauthScopes

      public ApiResponse<OAuthScopeListing> getOauthScopes(ApiRequest<Void> request) throws IOException
      The list of OAuth scopes
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • postOauthClientSecret

      public OAuthClient postOauthClientSecret(String clientId) throws IOException, ApiException
      Regenerate Client Secret This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution.
      Parameters:
      clientId - Client ID (required)
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • postOauthClientSecretWithHttpInfo

      public ApiResponse<OAuthClient> postOauthClientSecretWithHttpInfo(String clientId) throws IOException
      Regenerate Client Secret This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution.
      Parameters:
      clientId - Client ID (required)
      Returns:
      OAuthClient
      Throws:
      IOException - if the request fails to be processed
    • postOauthClientSecret

      public OAuthClient postOauthClientSecret(PostOauthClientSecretRequest request) throws IOException, ApiException
      Regenerate Client Secret This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution.
      Parameters:
      request - The request object
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • postOauthClientSecret

      public ApiResponse<OAuthClient> postOauthClientSecret(ApiRequest<Void> request) throws IOException
      Regenerate Client Secret This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution.
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • postOauthClientUsageQuery

      public UsageExecutionResult postOauthClientUsageQuery(String clientId, ApiUsageClientQuery body) throws IOException, ApiException
      Query for OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      clientId - Client ID (required)
      body - Query (required)
      Returns:
      UsageExecutionResult
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • postOauthClientUsageQueryWithHttpInfo

      public ApiResponse<UsageExecutionResult> postOauthClientUsageQueryWithHttpInfo(String clientId, ApiUsageClientQuery body) throws IOException
      Query for OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      clientId - Client ID (required)
      body - Query (required)
      Returns:
      UsageExecutionResult
      Throws:
      IOException - if the request fails to be processed
    • postOauthClientUsageQuery

      public UsageExecutionResult postOauthClientUsageQuery(PostOauthClientUsageQueryRequest request) throws IOException, ApiException
      Query for OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      request - The request object
      Returns:
      UsageExecutionResult
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • postOauthClientUsageQuery

      public ApiResponse<UsageExecutionResult> postOauthClientUsageQuery(ApiRequest<ApiUsageClientQuery> request) throws IOException
      Query for OAuth client API usage After calling this method, you will then need to poll for the query results based on the returned execution Id
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • postOauthClients

      public OAuthClient postOauthClients(OAuthClientRequest body) throws IOException, ApiException
      Create OAuth client The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. The preferred authorizedGrantTypes is 'CODE' which requires applications to send a client ID and client secret. This is typically a web server. If the client is unable to secure the client secret then the 'TOKEN' grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. If a client is to be used outside of the context of a user then the 'CLIENT-CREDENTIALS' grant may be used. In this case the client must be granted roles via the 'roleIds' field.
      Parameters:
      body - Client (required)
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • postOauthClientsWithHttpInfo

      public ApiResponse<OAuthClient> postOauthClientsWithHttpInfo(OAuthClientRequest body) throws IOException
      Create OAuth client The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. The preferred authorizedGrantTypes is 'CODE' which requires applications to send a client ID and client secret. This is typically a web server. If the client is unable to secure the client secret then the 'TOKEN' grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. If a client is to be used outside of the context of a user then the 'CLIENT-CREDENTIALS' grant may be used. In this case the client must be granted roles via the 'roleIds' field.
      Parameters:
      body - Client (required)
      Returns:
      OAuthClient
      Throws:
      IOException - if the request fails to be processed
    • postOauthClients

      public OAuthClient postOauthClients(PostOauthClientsRequest request) throws IOException, ApiException
      Create OAuth client The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. The preferred authorizedGrantTypes is 'CODE' which requires applications to send a client ID and client secret. This is typically a web server. If the client is unable to secure the client secret then the 'TOKEN' grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. If a client is to be used outside of the context of a user then the 'CLIENT-CREDENTIALS' grant may be used. In this case the client must be granted roles via the 'roleIds' field.
      Parameters:
      request - The request object
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • postOauthClients

      public ApiResponse<OAuthClient> postOauthClients(ApiRequest<OAuthClientRequest> request) throws IOException
      Create OAuth client The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. The preferred authorizedGrantTypes is 'CODE' which requires applications to send a client ID and client secret. This is typically a web server. If the client is unable to secure the client secret then the 'TOKEN' grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. If a client is to be used outside of the context of a user then the 'CLIENT-CREDENTIALS' grant may be used. In this case the client must be granted roles via the 'roleIds' field.
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed
    • putOauthClient

      public OAuthClient putOauthClient(String clientId, OAuthClientRequest body) throws IOException, ApiException
      Update OAuth Client
      Parameters:
      clientId - Client ID (required)
      body - Client (required)
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • putOauthClientWithHttpInfo

      public ApiResponse<OAuthClient> putOauthClientWithHttpInfo(String clientId, OAuthClientRequest body) throws IOException
      Update OAuth Client
      Parameters:
      clientId - Client ID (required)
      body - Client (required)
      Returns:
      OAuthClient
      Throws:
      IOException - if the request fails to be processed
    • putOauthClient

      public OAuthClient putOauthClient(PutOauthClientRequest request) throws IOException, ApiException
      Update OAuth Client
      Parameters:
      request - The request object
      Returns:
      OAuthClient
      Throws:
      ApiException - if the request fails on the server
      IOException - if the request fails to be processed
    • putOauthClient

      public ApiResponse<OAuthClient> putOauthClient(ApiRequest<OAuthClientRequest> request) throws IOException
      Update OAuth Client
      Parameters:
      request - The request object
      Returns:
      the response
      Throws:
      IOException - if the request fails to be processed