Package com.atlan.api

Class AbstractEndpoint

java.lang.Object
com.atlan.api.AbstractEndpoint
Direct Known Subclasses:
AtlasEndpoint, ChronosEndpoint, HekaEndpoint, HeraclesEndpoint, KeycloakEndpoint

public abstract class AbstractEndpoint extends Object
  • Field Details

    • client

      protected final transient AtlanClient client
  • Constructor Details

    • AbstractEndpoint

      protected AbstractEndpoint(AtlanClient client)
  • Method Details

    • getBaseUrl

      protected String getBaseUrl(String service, String prefix) throws ApiConnectionException
      Retrieve the base URL to use to access the endpoint.
      Parameters:
      service - the internal service used to access the endpoint
      prefix - the prefix used for routing external access to the endpoint
      Returns:
      the base URL (including any prefix) to use to access the API endpoint
      Throws:
      ApiConnectionException - if no base URL has been defined, and the SDK has not been configured for internal access
    • executeWithRetries

      public <T extends ApiResource> T executeWithRetries(AbstractEndpoint.ThrowingSupplier<T,AtlanException> apiCall, RequestOptions options) throws AtlanException
      Make the API call (including retrying it on any failure) up to the maximum of the client's max retries or the provided options max retries.
      Type Parameters:
      T - type of information returned by the API call
      Parameters:
      apiCall - to be made and retried (if needed)
      options - to override default client settings
      Returns:
      whatever is returned by the API call
      Throws:
      AtlanException - on any API communication issues (in particular, exhausting the retry limit)
    • getClient

      public AtlanClient getClient()