Class ApiLocator

java.lang.Object
com.dtsx.astra.sdk.utils.ApiLocator

public class ApiLocator extends Object
Utility class to find endpoints of the Astra APIs.
Author:
Cedrick LUNVEN (@clunven)
  • Field Details

  • Method Details

    • getApiDevopsEndpoint

      public static String getApiDevopsEndpoint(ApiLocator.AstraEnvironment env)
      Get the Devops endpoint.
      Parameters:
      env - change target environment for the API
      Returns:
      the devops URL.
    • getApiRestEndpoint

      public static final String getApiRestEndpoint(String dbId, String dbRegion)
      REST and DOCUMENT endpoint for a database and region.
      Parameters:
      dbId - database identifier
      dbRegion - 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 environment
      dbId - database identifier
      dbRegion - region identifier
      Returns:
      the url to invoke
    • getApiDocumentEndpoint

      public static final String getApiDocumentEndpoint(String dbId, String dbRegion)
      Document endpoint.
      Parameters:
      dbId - database identifier
      dbRegion - database region
      Returns:
      endpoint
    • getApiDocumentEndpoint

      public static final String getApiDocumentEndpoint(ApiLocator.AstraEnvironment env, String dbId, String dbRegion)
      Document endpoint.
      Parameters:
      env - target environment
      dbId - database identifier
      dbRegion - database region
      Returns:
      endpoint
    • getEndpointHealthCheck

      public static final String getEndpointHealthCheck(String dbId, String dbRegion)
      Document endpoint
      Parameters:
      dbId - database identifier
      dbRegion - database region
      Returns:
      endpoint
    • getEndpointHealthCheck

      public static final String getEndpointHealthCheck(ApiLocator.AstraEnvironment env, String dbId, String dbRegion)
      Document endpoint.
      Parameters:
      env - target environment
      dbId - database identifier
      dbRegion - database region
      Returns:
      endpoint
    • getApiGrpcEndPoint

      public static final String getApiGrpcEndPoint(String dbId, String dbRegion)
      GRAPHQL endpoint for a database and region working with Schema definition
      Parameters:
      dbId - database identifier
      dbRegion - 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 environment
      dbId - database identifier
      dbRegion - region identifier
      Returns:
      the url to invoke
    • getApiGraphQLEndPoint

      public static final String getApiGraphQLEndPoint(String dbId, String dbRegion)
      GRAPHQL endpoint for a database and region working with Schema definition
      Parameters:
      dbId - database identifier
      dbRegion - 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 environment
      dbId - database identifier
      dbRegion - region identifier
      Returns:
      the url to invoke
    • getApiGraphQLSchemaEndPoint

      public static final String getApiGraphQLSchemaEndPoint(String dbId, String dbRegion)
      GRAPHQL endpoint for a database and region working with Schema definition
      Parameters:
      dbId - database identifier
      dbRegion - 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 environment
      dbId - database identifier
      dbRegion - region identifier
      Returns:
      the url to invoke
    • getApiGraphQLEndPoint

      public static final String getApiGraphQLEndPoint(String dbId, String dbRegion, String keyspace)
      GRAPHQL endpoint for a database and region working with Schema definition
      Parameters:
      dbId - database identifier
      dbRegion - region identifier
      keyspace - 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 environment
      dbId - database identifier
      dbRegion - region identifier
      keyspace - 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 environment
      cluster - current cluster
      tenant - current tenant
      Returns:
      api endpoint
    • getApiStreamingV2Endpoint

      public static final String getApiStreamingV2Endpoint(ApiLocator.AstraEnvironment env, String cluster)