Skip to content

Table of Contents

search

Search Objects

class Search()

The class includes all necessary methods to access the Grafana search 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

search

def search(search_query: str) -> list

The method includes a functionality to execute a custom query

Arguments:

  • search_query str - Specify the inserted query as string

Raises:

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

Returns:

  • api_call list - Returns the list of query the results