cm_client.DashboardsResourceApi

All URIs are relative to /api/v58

Method HTTP request Description
create_dashboards POST /timeseries/dashboards
delete_dashboard DELETE /timeseries/dashboards/{dashboardName}
get_dashboard GET /timeseries/dashboards/{dashboardName}
get_dashboards GET /timeseries/dashboards

create_dashboards

ApiDashboardList create_dashboards(body=body)

Creates the list of dashboards. If any of the dashboards already exist this whole command will fail and no dashboards will be created.

Available since API v6.

Example

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.DashboardsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiDashboardList() # ApiDashboardList | The list of dashboards to create. (optional)

try:
    api_response = api_instance.create_dashboards(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsResourceApi->create_dashboards: %s\n" % e)

Parameters

Name Type Description Notes
body ApiDashboardList The list of dashboards to create. [optional]

Return type

ApiDashboardList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_dashboard

ApiDashboard delete_dashboard(dashboard_name)

Deletes a dashboard.

Available since API v6.

Example

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.DashboardsResourceApi(cm_client.ApiClient(configuration))
dashboard_name = 'dashboard_name_example' # str | The name of the dashboard.

try:
    api_response = api_instance.delete_dashboard(dashboard_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsResourceApi->delete_dashboard: %s\n" % e)

Parameters

Name Type Description Notes
dashboard_name str The name of the dashboard.

Return type

ApiDashboard

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_dashboard

ApiDashboard get_dashboard(dashboard_name)

Returns a dashboard definition for the specified name. This dashboard can be imported with the createDashboards API.

Available since API v6.

Example

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.DashboardsResourceApi(cm_client.ApiClient(configuration))
dashboard_name = 'dashboard_name_example' # str | The name of the dashboard.

try:
    api_response = api_instance.get_dashboard(dashboard_name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsResourceApi->get_dashboard: %s\n" % e)

Parameters

Name Type Description Notes
dashboard_name str The name of the dashboard.

Return type

ApiDashboard

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_dashboards

ApiDashboardList get_dashboards()

Returns the list of all user-customized dashboards. This includes both the new dashboards created by users as well as any user customizations to built-in dashboards.

Available since API v6.

Example

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.DashboardsResourceApi(cm_client.ApiClient(configuration))

try:
    api_response = api_instance.get_dashboards()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DashboardsResourceApi->get_dashboards: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ApiDashboardList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]