All URIs are relative to https://localhost/api/v33
Method | HTTP request | Description |
---|---|---|
create_data_context | POST /dataContexts | Create a datacontext. |
delete_data_context | DELETE /dataContexts/{dataContextName} | Delete a datacontext. |
read_data_context | GET /dataContexts/{dataContextName} | Reads information about a datacontext. |
read_data_contexts | GET /dataContexts | Get all the datacontexts. |
ApiDataContext create_data_context(body=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)
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.DataContextsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiDataContext() # ApiDataContext | DataContext to be created. (optional)
try:
# Create a datacontext.
api_response = api_instance.create_data_context(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DataContextsResourceApi->create_data_context: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ApiDataContext | DataContext to be created. | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiDataContext delete_data_context(data_context_name)
Delete a datacontext.
Delete a datacontext.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.DataContextsResourceApi(cm_client.ApiClient(configuration))
data_context_name = 'data_context_name_example' # str | Name of the datacontext.
try:
# Delete a datacontext.
api_response = api_instance.delete_data_context(data_context_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling DataContextsResourceApi->delete_data_context: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
data_context_name | str | Name of the datacontext. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiDataContext read_data_context(data_context_name)
Reads information about a datacontext.
Reads information about a datacontext.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.DataContextsResourceApi(cm_client.ApiClient(configuration))
data_context_name = 'data_context_name_example' # str | Name of the datacontext.
try:
# Reads information about a datacontext.
api_response = api_instance.read_data_context(data_context_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling DataContextsResourceApi->read_data_context: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
data_context_name | str | Name of the datacontext. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiDataContextList read_data_contexts()
Get all the datacontexts.
Get all the datacontexts.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.DataContextsResourceApi(cm_client.ApiClient(configuration))
try:
# Get all the datacontexts.
api_response = api_instance.read_data_contexts()
pprint(api_response)
except ApiException as e:
print("Exception when calling DataContextsResourceApi->read_data_contexts: %s\n" % e)
This endpoint does not need any parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]