Package com.atlan.api

Class OAuthClientsEndpoint


public class OAuthClientsEndpoint extends HeraclesEndpoint
API endpoints for managing Atlan's OAuth clients.
  • Constructor Details

    • OAuthClientsEndpoint

      public OAuthClientsEndpoint(AtlanClient client)
  • Method Details

    • list

      public OAuthClientResponse list() throws AtlanException
      Retrieves a list of the 20 most recently created clients defined in Atlan.
      Returns:
      a list of the 20 most recently created clients in Atlan
      Throws:
      AtlanException - on any API communication issue
    • list

      public OAuthClientResponse list(RequestOptions options) throws AtlanException
      Retrieves a list of the 20 most recently created clients defined in Atlan.
      Parameters:
      options - to override default client settings
      Returns:
      a list of the 20 most recently created clients in Atlan
      Throws:
      AtlanException - on any API communication issue
    • list

      public OAuthClientResponse list(String filter, String sort, int offset, int limit) throws AtlanException
      Retrieves a list of the OAuth clients defined in Atlan.
      Parameters:
      filter - which clients to retrieve
      sort - property by which to sort the results
      offset - starting point for results to return, for paging
      limit - maximum number of results to be returned
      Returns:
      a list of clients that match the provided criteria
      Throws:
      AtlanException - on any API communication issue
    • list

      public OAuthClientResponse list(String filter, String sort, int offset, int limit, RequestOptions options) throws AtlanException
      Retrieves a list of the OAuth clients defined in Atlan.
      Parameters:
      filter - which clients to retrieve
      sort - property by which to sort the results
      offset - starting point for results to return, for paging
      limit - maximum number of results to be returned
      options - to override default client settings
      Returns:
      a list of clients that match the provided criteria
      Throws:
      AtlanException - on any API communication issue
    • get

      public OAuthClient get(String displayName) throws AtlanException
      Retrieves the OAuth client with a name that exactly matches the provided string.
      Parameters:
      displayName - name (as it appears in the UI) by which to retrieve the OAuth client
      Returns:
      the OAuth client whose name (in the UI) matches the provided string, or null if there is none
      Throws:
      AtlanException - on any error during API invocation
    • getById

      public OAuthClient getById(String clientId) throws AtlanException
      Retrieves the OAuth client with a client ID that exactly matches the provided string.
      Parameters:
      clientId - unique client identifier by which to retrieve the OAuth client
      Returns:
      the OAuth client whose clientId matches the provided string, or null if there is none
      Throws:
      AtlanException - on any error during API invocation
    • getByGuid

      public OAuthClient getByGuid(String guid) throws AtlanException
      Retrieves the OAuth client with a unique ID (GUID) that exactly matches the provided string.
      Parameters:
      guid - unique identifier by which to retrieve the OAuth client
      Returns:
      the OAuth client whose GUID matches the provided string, or null if there is none
      Throws:
      AtlanException - on any error during API invocation
    • create

      public OAuthClient create(String displayName, String description, Set<String> personas, String role) throws AtlanException
      Create a new OAuth client with the provided settings.
      Parameters:
      displayName - human-readable name for the OAuth client
      description - optional explanation of the OAuth client
      personas - unique names (qualifiedNames) of personas that should be linked to the client
      role - workspace role the client should be bound to
      Returns:
      the created OAuth client
      Throws:
      AtlanException - on any API communication issue
    • create

      public OAuthClient create(String displayName, String description, Set<String> personas, String role, RequestOptions options) throws AtlanException
      Create a new OAuth client with the provided settings.
      Parameters:
      displayName - human-readable name for the OAuth client
      description - optional explanation of the OAuth client
      personas - unique names (qualifiedNames) of personas that should be linked to the client
      role - workspace role the client should be bound to
      options - to override default client settings
      Returns:
      the created OAuth client
      Throws:
      AtlanException - on any API communication issue
    • update

      public OAuthClient update(String clientId, String displayName, String description) throws AtlanException
      Update an existing OAuth client with the provided settings.
      Parameters:
      clientId - unique identifier of the OAuth client
      displayName - human-readable name for the OAuth client
      description - optional explanation of the OAuth client
      Returns:
      the updated OAuth client
      Throws:
      AtlanException - on any API communication issue
    • update

      public OAuthClient update(String clientId, String displayName, String description, RequestOptions options) throws AtlanException
      Update an existing OAuth client with the provided settings.
      Parameters:
      clientId - unique identifier of the OAuth client
      displayName - human-readable name for the OAuth client
      description - optional explanation of the OAuth client
      options - to override default client settings
      Returns:
      the updated OAuth client
      Throws:
      AtlanException - on any API communication issue
    • purge

      public void purge(String clientId) throws AtlanException
      Delete (purge) the specified OAuth client.
      Parameters:
      clientId - unique identifier of the OAuth client to delete
      Throws:
      AtlanException - on any API communication issue
    • purge

      public void purge(String clientId, RequestOptions options) throws AtlanException
      Delete (purge) the specified OAuth client.
      Parameters:
      clientId - unique identifier of the OAuth client to delete
      options - to override default client settings
      Throws:
      AtlanException - on any API communication issue
    • exchange

      public OAuthExchangeResponse exchange(String clientId, String clientSecret) throws AtlanException
      Exchange client details for a (short-lived) bearer token.
      Parameters:
      clientId - unique identifier of the OAuth client
      clientSecret - secret for the OAuth client
      Throws:
      AtlanException - on any API communication issue
    • exchange

      public OAuthExchangeResponse exchange(String clientId, String clientSecret, RequestOptions options) throws AtlanException
      Exchange client details for a (short-lived) bearer token.
      Parameters:
      clientId - unique identifier of the OAuth client
      clientSecret - secret for the OAuth client
      options - to override default client settings
      Throws:
      AtlanException - on any API communication issue