Skip to content

Table of Contents

short_url

ShortUrl Objects

class ShortUrl()

The class includes all necessary methods to access the Grafana short url API endpoint

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

create_short_url

def create_short_url(path: str)

The method includes a functionality to create a short link for a specific dashboard

Arguments:

  • path str - Specify the corresponding dashboard path

Raises:

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

Returns:

  • api_call dict - Returns the uid and the url of the newly generated link