Class Client

java.lang.Object
com.mindsdb.client.Client

public class Client extends Object
The Client class provides an interface for interacting with the Minds and Datasources services. It manages the creation and lifecycle of the RestClient, MindsService, and DatasourcesService instances.

This class is designed to facilitate communication with an API using the specified API key and optional base URL.

  • Field Details

  • Constructor Details

    • Client

      public Client(String apiKey)
      Constructs a new Client with the specified API key. This will create a default RestClient instance using the provided API key.

      The MindsService and DatasourcesService will be initialized using the created RestClient.

      Parameters:
      apiKey - the API key used for authentication
    • Client

      public Client(String apiKey, String baseUrl)
      Constructs a new Client with the specified API key and base URL. This allows for communication with an API located at a custom base URL.

      The MindsService and DatasourcesService will be initialized using the created RestClient.

      Parameters:
      apiKey - the API key used for authentication
      baseUrl - the base URL of the API
  • Method Details

    • shutDownConnection

      public void shutDownConnection()
      Shuts down the connection managed by the RestClient. This method should be called when the client is no longer needed to release resources associated with the connection.