DataContextsResourceApi

All URIs are relative to https://localhost/api/v55

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.

createDataContext

ApiDataContext createDataContext(body)

Create a datacontext.

Create a datacontext. Following are are required fields of ApiDataContext: name, displayName, services.

Example

// 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();
}

Parameters

Name Type Description Notes
body ApiDataContext DataContext to be created. [optional]

Return type

ApiDataContext

Authorization

basic

HTTP request headers

deleteDataContext

ApiDataContext deleteDataContext(dataContextName)

Delete a datacontext.

Delete a datacontext.

Example

// 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();
}

Parameters

Name Type Description Notes
dataContextName String Name of the datacontext.

Return type

ApiDataContext

Authorization

basic

HTTP request headers

readDataContext

ApiDataContext readDataContext(dataContextName)

Reads information about a datacontext.

Reads information about a datacontext.

Example

// 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();
}

Parameters

Name Type Description Notes
dataContextName String Name of the datacontext.

Return type

ApiDataContext

Authorization

basic

HTTP request headers

readDataContexts

ApiDataContextList readDataContexts()

Get all the datacontexts.

Get all the datacontexts.

Example

// 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();
}

Parameters

This endpoint does not need any parameter.

Return type

ApiDataContextList

Authorization

basic

HTTP request headers

updateDataContext

ApiDataContext updateDataContext(body)

Update a datacontext.

Update a datacontext. Following are are required fields of ApiDataContext: ApiDataContext#getName(), services.

Example

// 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();
}

Parameters

Name Type Description Notes
body ApiDataContext DataContext to be updated. [optional]

Return type

ApiDataContext

Authorization

basic

HTTP request headers