All URIs are relative to https://localhost/api/v42
Method | HTTP request | Description |
---|---|---|
createDataContext | POST /dataContexts | Create a datacontext. |
deleteDataContext | DELETE /dataContexts/{dataContextName} | Delete a datacontext. |
readDataContext | GET /dataContexts/{dataContextName} | Reads information about a datacontext. |
readDataContexts | GET /dataContexts | Get all the datacontexts. |
ApiDataContext createDataContext(body)
Create a datacontext.
Create a datacontext. Following are are required fields of ApiDataContext ApiDataContext#setName(String)
ApiDataContext#setDisplayName(String)
ApiDataContext#setServices(java.util.List)
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.DataContextsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
DataContextsResourceApi apiInstance = new DataContextsResourceApi();
ApiDataContext body = new ApiDataContext(); // ApiDataContext | DataContext to be created.
try {
ApiDataContext result = apiInstance.createDataContext(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataContextsResourceApi#createDataContext");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ApiDataContext | DataContext to be created. | [optional] |
ApiDataContext deleteDataContext(dataContextName)
Delete a datacontext.
Delete a datacontext.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.DataContextsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
DataContextsResourceApi apiInstance = new DataContextsResourceApi();
String dataContextName = "dataContextName_example"; // String | Name of the datacontext.
try {
ApiDataContext result = apiInstance.deleteDataContext(dataContextName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataContextsResourceApi#deleteDataContext");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
dataContextName | String | Name of the datacontext. |
ApiDataContext readDataContext(dataContextName)
Reads information about a datacontext.
Reads information about a datacontext.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.DataContextsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
DataContextsResourceApi apiInstance = new DataContextsResourceApi();
String dataContextName = "dataContextName_example"; // String | Name of the datacontext.
try {
ApiDataContext result = apiInstance.readDataContext(dataContextName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataContextsResourceApi#readDataContext");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
dataContextName | String | Name of the datacontext. |
ApiDataContextList readDataContexts()
Get all the datacontexts.
Get all the datacontexts.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.DataContextsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
DataContextsResourceApi apiInstance = new DataContextsResourceApi();
try {
ApiDataContextList result = apiInstance.readDataContexts();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataContextsResourceApi#readDataContexts");
e.printStackTrace();
}
This endpoint does not need any parameter.