Skip to content

Table of Contents

other_http

OtherHTTP Objects

class OtherHTTP()

The class includes all necessary methods to access other Grafana API endpoints

Arguments:

  • grafana_api_model APIModel - Inject a Grafana API model object that includes all necessary values and information

Attributes:

  • grafana_api_model APIModel - This is where we store the grafana_api_model

get_frontend_settings

def get_frontend_settings() -> dict

The method includes a functionality to get the frontend settings

Raises:

  • Exception - Unspecified error by executing the API call

Returns:

  • api_call dict - Returns the corresponding frontend settings

def renew_login_session_based_on_remember_cookie()

The method includes a functionality to renew the login session based on the remember cookie

Raises:

  • Exception - Unspecified error by executing the API call

Returns:

None

get_health_status

def get_health_status() -> dict

The method includes a functionality to get the health information

Raises:

  • Exception - Unspecified error by executing the API call

Returns:

  • api_call dict - Returns the health information

get_metrics

def get_metrics(basic_auth_username: str = None,
                basic_auth_password: str = None) -> str

The method includes a functionality to get the Grafana metrics information

Arguments:

  • basic_auth_username str - Specify the optional basic auth username
  • basic_auth_password str - Specify the optional basic auth password

Raises:

  • Exception - Unspecified error by executing the API call

Returns:

  • api_call str - Returns the metrics information

get_plugin_metrics

def get_plugin_metrics(plugin_id: str,
                       basic_auth_username: str = None,
                       basic_auth_password: str = None) -> str

The method includes a functionality to get the Grafana plugin metrics information

Arguments:

  • plugin_id str - Specify the plugin id
  • basic_auth_username str - Specify the optional basic auth username
  • basic_auth_password str - Specify the optional basic auth password

Raises:

  • ValueError - Missed specifying a necessary value
  • Exception - Unspecified error by executing the API call

Returns:

  • api_call str - Returns the metrics information