Package com.relationalai
Class Client
- java.lang.Object
-
- com.relationalai.Client
-
public class Client extends Object
-
-
Field Summary
Fields Modifier and Type Field Description Credentials
credentials
static String
DEFAULT_HOST
static int
DEFAULT_PORT
static String
DEFAULT_REGION
static String
DEFAULT_SCHEME
String
host
int
port
String
region
String
scheme
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_REGION
public static final String DEFAULT_REGION
- See Also:
- Constant Field Values
-
DEFAULT_SCHEME
public static final String DEFAULT_SCHEME
- See Also:
- Constant Field Values
-
DEFAULT_HOST
public static final String DEFAULT_HOST
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
region
public String region
-
scheme
public String scheme
-
host
public String host
-
port
public int port
-
credentials
public Credentials credentials
-
-
Method Detail
-
getHttpClient
public HttpClient getHttpClient()
-
setHttpClient
public Client setHttpClient(HttpClient httpClient)
-
setAccessTokenHandler
public void setAccessTokenHandler(AccessTokenHandler handler)
-
fetchAccessToken
public AccessToken fetchAccessToken(ClientCredentials credentials) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
getAccessToken
public AccessToken getAccessToken(ClientCredentials credentials) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
request
public Object request(String method, String path, QueryParams params) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
request
public Object request(String method, String path, Map<String,String> headers, QueryParams params, String body) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
delete
public Object delete(String path) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
delete
public Object delete(String path, QueryParams params, String body) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
get
public Object get(String path) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
get
public Object get(String path, QueryParams params) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
get
public Object get(String path, Map<String,String> headers) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
get
public Object get(String path, Map<String,String> headers, QueryParams params) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
patch
public Object patch(String path, QueryParams params, String body) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
post
public Object post(String path, QueryParams params, String body) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
put
public Object put(String path, QueryParams params, String body) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createDatabase
public Database createDatabase(String database, String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createDatabase
public Database createDatabase(String database, String engine, boolean overwrite) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
cloneDatabase
public Database cloneDatabase(String database, String engine, String source) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
cloneDatabase
public Database cloneDatabase(String database, String engine, String source, boolean overwrite) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteDatabase
public DeleteDatabaseResponse deleteDatabase(String database) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
getDatabase
public Database getDatabase(String database) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listDatabases
public Database[] listDatabases() throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listDatabases
public Database[] listDatabases(String state) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createEngine
public Engine createEngine(String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createEngine
public Engine createEngine(String engine, String size) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createEngineWait
public Engine createEngineWait(String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createEngineWait
public Engine createEngineWait(String engine, String size) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteEngine
public Engine deleteEngine(String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteEngineWait
public Engine deleteEngineWait(String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
getEngine
public Engine getEngine(String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listEngines
public Engine[] listEngines() throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listEngines
public Engine[] listEngines(String state) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createOAuthClient
public OAuthClientExtra createOAuthClient(String name) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createOAuthClient
public OAuthClientExtra createOAuthClient(String name, String[] permissions) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteOAuthClient
public DeleteOAuthClientResponse deleteOAuthClient(String id) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
findOAuthClient
public OAuthClient findOAuthClient(String name) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
getOAuthClient
public OAuthClientExtra getOAuthClient(String id) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listOAuthClients
public OAuthClient[] listOAuthClients() throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createUser
public User createUser(String email) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
createUser
public User createUser(String email, String[] roles) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteUser
public DeleteUserResponse deleteUser(String id) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
disableUser
public User disableUser(String id) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
enableUser
public User enableUser(String id) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
findUser
public User findUser(String email) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
getUser
public User getUser(String id) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listUsers
public User[] listUsers() throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
updateUser
public User updateUser(String id, String status) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
updateUser
public User updateUser(String id, String[] roles) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
updateUser
public User updateUser(String id, String status, String[] roles) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
updateUser
public User updateUser(String id, UpdateUserRequest req) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
executeV1
public TransactionResult executeV1(String database, String engine, String source) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
executeV1
public TransactionResult executeV1(String database, String engine, String source, boolean readonly) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
executeV1
public TransactionResult executeV1(String database, String engine, String source, boolean readonly, Map<String,String> inputs) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
execute
public TransactionAsyncResult execute(String database, String engine, String source, boolean readonly) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
execute
public TransactionAsyncResult execute(String database, String engine, String source, boolean readonly, Map<String,String> inputs) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
executeAsync
public TransactionAsyncResult executeAsync(String database, String engine, String source, boolean readonly) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
executeAsync
public TransactionAsyncResult executeAsync(String database, String engine, String source, boolean readonly, Map<String,String> inputs) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
getTransaction
public TransactionAsyncSingleResponse getTransaction(String id) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
getTransactions
public TransactionsAsyncMultipleResponses getTransactions() throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
getTransactionResults
public List<ArrowRelation> getTransactionResults(String id) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
getTransactionMetadata
public Message.MetadataInfo getTransactionMetadata(String id) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
getTransactionProblems
public List<Object> getTransactionProblems(String id) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
cancelTransaction
public TransactionAsyncCancelResponse cancelTransaction(String id) throws HttpError, IOException, InterruptedException
- Throws:
HttpError
IOException
InterruptedException
-
listEdbs
public Edb[] listEdbs(String database, String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteModel
public TransactionResult deleteModel(String database, String engine, String name) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
deleteModel
public TransactionResult deleteModel(String database, String engine, String[] names) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
getModel
public com.relationalai.Model getModel(String database, String engine, String name) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadModel
public TransactionResult loadModel(String database, String engine, String name, InputStream model) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadModel
public TransactionResult loadModel(String database, String engine, String name, String model) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadModels
public TransactionResult loadModels(String database, String engine, Map<String,String> models) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listModelNames
public String[] listModelNames(String database, String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
listModels
public com.relationalai.Model[] listModels(String database, String engine) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadCsv
public TransactionResult loadCsv(String database, String engine, String relation, InputStream data) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadCsv
public TransactionResult loadCsv(String database, String engine, String relation, String data) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadCsv
public TransactionResult loadCsv(String database, String engine, String relation, InputStream data, CsvOptions options) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadCsv
public TransactionResult loadCsv(String database, String engine, String relation, String data, CsvOptions options) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadJson
public TransactionResult loadJson(String database, String engine, String relation, InputStream data) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
loadJson
public TransactionResult loadJson(String database, String engine, String relation, String data) throws HttpError, InterruptedException, IOException
- Throws:
HttpError
InterruptedException
IOException
-
-