Package com.atlan.api

Class ImpersonationEndpoint

java.lang.Object
com.atlan.api.AbstractEndpoint
com.atlan.api.ImpersonationEndpoint

public class ImpersonationEndpoint extends AbstractEndpoint
API endpoints for impersonating users as part of Atlan automations (if desired). Note: this will only work when run as part of Atlan's packaged workflow ecosystem (running in the cluster back-end).
  • Constructor Details

    • ImpersonationEndpoint

      public ImpersonationEndpoint(AtlanClient client)
  • Method Details

    • getBaseUrl

      protected String getBaseUrl() throws ApiConnectionException
      Throws:
      ApiConnectionException
    • escalate

      public String escalate() throws AtlanException
      Escalate to a privileged user on a short-term basis. Note: this is only possible from within the Atlan tenant, and only when given the appropriate credentials.
      Returns:
      a short-lived bearer token with escalated privileges
      Throws:
      AtlanException - on any API communication or permission issue
    • escalate

      public String escalate(RequestOptions options) throws AtlanException
      Escalate to a privileged user on a short-term basis. Note: this is only possible from within the Atlan tenant, and only when given the appropriate credentials.
      Parameters:
      options - to override default client settings
      Returns:
      a short-lived bearer token with escalated privileges
      Throws:
      AtlanException - on any API communication or permission issue
    • user

      public String user(String userId) throws AtlanException
      Retrieves a bearer token that impersonates the provided user.
      Parameters:
      userId - unique identifier of the user to impersonate
      Returns:
      a bearer token that impersonates the provided user
      Throws:
      AtlanException - on any API communication issue
    • user

      public String user(String userId, RequestOptions options) throws AtlanException
      Retrieves a bearer token that impersonates the provided user.
      Parameters:
      userId - unique identifier of the user to impersonate
      options - to override default client settings
      Returns:
      a bearer token that impersonates the provided user
      Throws:
      AtlanException - on any API communication issue