Class DataRobotAIClient

    • Field Detail

      • CLIENT_VERSION

        public static final java.lang.String CLIENT_VERSION
        The current version of the client
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataRobotAIClient

        public DataRobotAIClient()
        Create a new instance of the DataRobotAIClient from an API_KEY environment variable
      • DataRobotAIClient

        public DataRobotAIClient​(java.lang.String key)
        Create a new instance of the DataRobotAIClient
        Parameters:
        key - The API Key from your account
      • DataRobotAIClient

        public DataRobotAIClient​(java.lang.String key,
                                 java.lang.String endpoint)
        Create a new instance of the DataRobotAIClient
        Parameters:
        key - The API Key from your account
        endpoint - The URL this client will connect tos
      • DataRobotAIClient

        public DataRobotAIClient​(java.lang.String key,
                                 java.lang.String endpoint,
                                 com.google.api.client.http.HttpTransport httpTransport)
                          throws java.lang.IllegalArgumentException
        Internal provided for testing use only
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • getApiKey

        public java.lang.String getApiKey()
        The currently configured API key used by this instance of the client.
        Returns:
        The currently configured API Key.
      • getConfiguredUrl

        public java.lang.String getConfiguredUrl()
        Gets the URL endpoint the client is currently connected to.
        Returns:
        the URL of the DataRobot AI API that is currently being used.
      • getConnection

        public ApiConnection getConnection()
        Internal Returns the HTTP connection used for all calls in the client.
        Specified by:
        getConnection in interface IDataRobotAIClient
        Returns:
        The HTTP connection used for all calls in the client.
      • setHttpMessageTransformer

        public void setHttpMessageTransformer​(Action<com.google.api.client.http.HttpRequest,​com.google.api.client.http.HttpResponse> httpMessageTransformer)
        Internal
        Specified by:
        setHttpMessageTransformer in interface IDataRobotAIClient
      • ping

        public Ping ping()
                  throws ClientException
        Internal
        Specified by:
        ping in interface IDataRobotAIClient
        Returns:
        Returns a Ping object that will contain 'Pong' if connection was successful.
        Throws:
        ClientException - when 4xx or 5xx response is received from server, or errors in parsing the response.
      • createAI

        public AI createAI​(java.lang.String name)
                    throws ClientException,
                           java.lang.InterruptedException
        Create an AI that will learn from past data to predict on new data. Note a AI can be sometimes referred to as an AI.
        Specified by:
        createAI in interface IDataRobotAIClient
        Parameters:
        name - The name of the AI
        Returns:
        AI
        Throws:
        ClientException - when 4xx or 5xx response is received from server, or errors in parsing the response.
        java.lang.InterruptedException - when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object