Table of Contents
licensing
Licensing Objects
class Licensing()
The class includes all necessary methods to access the Grafana licensing API endpoints. Be aware that the functionality is a Grafana ENTERPRISE v7.4+ feature
HINT: Note Grafana Enterprise API need required permissions if fine-grained access control is enabled
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
check_license_availability
def check_license_availability()
The method includes a functionality to checks if a valid license is available
Required Permissions: Action: licensing:read Scope: N/A
Raises:
Exception
- Unspecified error by executing the API call
Returns:
api_call
bool - Returns the result if the license is available or not
manually_force_license_refresh
def manually_force_license_refresh()
The method includes a functionality to manually ask license issuer for a new token
Required Permissions: Action: licensing:update Scope: N/A
Raises:
Exception
- Unspecified error by executing the API call
Returns:
api_call
dict - Returns the result of license refresh call
remove_license_from_database
def remove_license_from_database()
The method includes a functionality to removes the license stored in the Grafana database
Required Permissions: Action: licensing:delete Scope: N/A
Raises:
Exception
- Unspecified error by executing the API call
Returns:
api_call
dict - Returns the result of license refresh call