Package com.dtsx.astra.sdk.utils
Class ApiLocator
java.lang.Object
com.dtsx.astra.sdk.utils.ApiLocator
Utility class to find endpoints of the Astra APIs.
- Author:
- Cedrick LUNVEN (@clunven)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
SDk to be used on multiple Astra Environment. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Get the Devops endpoint.static final String
getApiDocumentEndpoint
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) Document endpoint.static final String
getApiDocumentEndpoint
(String dbId, String dbRegion) Document endpoint.static final String
getApiGraphQLEndPoint
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiGraphQLEndPoint
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion, String keyspace) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiGraphQLEndPoint
(String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiGraphQLEndPoint
(String dbId, String dbRegion, String keyspace) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiGraphQLSchemaEndPoint
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiGraphQLSchemaEndPoint
(String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiGrpcEndPoint
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definition.static final String
getApiGrpcEndPoint
(String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definitionstatic final String
getApiRestEndpoint
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) REST and DOCUMENT endpoint for a database and region.static final String
getApiRestEndpoint
(String dbId, String dbRegion) REST and DOCUMENT endpoint for a database and region.static final String
getApiStreamingV2Endpoint
(ApiLocator.AstraEnvironment env, String cluster) static final String
getApiStreamingV3Endpoint
(ApiLocator.AstraEnvironment env, String cluster, String tenant) Access Streaming v3 Api.static final String
getEndpointHealthCheck
(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) Document endpoint.static final String
getEndpointHealthCheck
(String dbId, String dbRegion) Document endpoint
-
Field Details
-
HTTPS
Building Astra base URL.- See Also:
-
-
Method Details
-
getApiDevopsEndpoint
Get the Devops endpoint.- Parameters:
env
- change target environment for the API- Returns:
- the devops URL.
-
getApiRestEndpoint
REST and DOCUMENT endpoint for a database and region.- Parameters:
dbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiRestEndpoint
public static final String getApiRestEndpoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) REST and DOCUMENT endpoint for a database and region.- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiDocumentEndpoint
Document endpoint.- Parameters:
dbId
- database identifierdbRegion
- database region- Returns:
- endpoint
-
getApiDocumentEndpoint
public static final String getApiDocumentEndpoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) Document endpoint.- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- database region- Returns:
- endpoint
-
getEndpointHealthCheck
Document endpoint- Parameters:
dbId
- database identifierdbRegion
- database region- Returns:
- endpoint
-
getEndpointHealthCheck
public static final String getEndpointHealthCheck(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) Document endpoint.- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- database region- Returns:
- endpoint
-
getApiGrpcEndPoint
GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
dbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiGrpcEndPoint
public static final String getApiGrpcEndPoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definition.- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiGraphQLEndPoint
GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
dbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiGraphQLEndPoint
public static final String getApiGraphQLEndPoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiGraphQLSchemaEndPoint
GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
dbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiGraphQLSchemaEndPoint
public static final String getApiGraphQLSchemaEndPoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion) GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- region identifier- Returns:
- the url to invoke
-
getApiGraphQLEndPoint
GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
dbId
- database identifierdbRegion
- region identifierkeyspace
- keyspace identifier- Returns:
- the url to invoke
-
getApiGraphQLEndPoint
public static final String getApiGraphQLEndPoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion, String keyspace) GRAPHQL endpoint for a database and region working with Schema definition- Parameters:
env
- target environmentdbId
- database identifierdbRegion
- region identifierkeyspace
- keyspace identifier- Returns:
- the url to invoke
-
getApiStreamingV3Endpoint
public static final String getApiStreamingV3Endpoint(ApiLocator.AstraEnvironment env, String cluster, String tenant) Access Streaming v3 Api.- Parameters:
env
- target environmentcluster
- current clustertenant
- current tenant- Returns:
- api endpoint
-
getApiStreamingV2Endpoint
public static final String getApiStreamingV2Endpoint(ApiLocator.AstraEnvironment env, String cluster)
-