All URIs are relative to /api/v57
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. |
updateDataContext | PUT /dataContexts | Update a datacontext. |
ApiDataContext createDataContext(body)
Create a datacontext.
Create a datacontext. Following are are required fields of ApiDataContext: name, displayName, services.
// 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.
ApiDataContext updateDataContext(body)
Update a datacontext.
Update a datacontext. Following are are required fields of ApiDataContext: ApiDataContext#getName(), services.
// 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 updated.
try {
ApiDataContext result = apiInstance.updateDataContext(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataContextsResourceApi#updateDataContext");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ApiDataContext | DataContext to be updated. | [optional] |