Package com.atlan.api
Class AbstractEndpoint
java.lang.Object
com.atlan.api.AbstractEndpoint
- Direct Known Subclasses:
AtlasEndpoint,ChronosEndpoint,HekaEndpoint,HeraclesEndpoint,KeycloakEndpoint
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUtility class for introspecting raw responses from API endpoints.static interfaceAbstractEndpoint.ThrowingSupplier<T,E extends Exception> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends ApiResource>
TexecuteWithRetries(AbstractEndpoint.ThrowingSupplier<T, AtlanException> apiCall, RequestOptions options) 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.protected StringgetBaseUrl(String service, String prefix) Retrieve the base URL to use to access the endpoint.
-
Field Details
-
client
-
-
Constructor Details
-
AbstractEndpoint
-
-
Method Details
-
getBaseUrl
Retrieve the base URL to use to access the endpoint.- Parameters:
service- the internal service used to access the endpointprefix- 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 AtlanExceptionMake 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
-