Table of Contents
external_group
ExternalGroup Objects
class ExternalGroup()
The class includes all necessary methods to access the Grafana external group API endpoints.
Arguments:
grafana_api_modelAPIModel - Inject a Grafana API model object that includes all necessary values and information
Attributes:
grafana_api_modelAPIModel - This is where we store the grafana_api_model
get_external_groups
def get_external_groups(team_id: int) -> list
The method includes a functionality to get the corresponding external groups specified by the team id
Arguments:
team_idint - Specify the team id
Required Permissions:
- Action - teams.permissions:read
- Scope - teams:*
Raises:
ValueError- Missed specifying a necessary valueException- Unspecified error by executing the API call
Returns:
api_calllist - Returns the external groups
add_external_group
def add_external_group(team_id: int, group_id: str)
The method includes a functionality to add the corresponding external groups specified by the team id and group id
Arguments:
team_idint - Specify the team idgroup_idstr - Specify the group id (e.g. cn=editors,ou=groups,dc=grafana,dc=org)
Required Permissions:
- Action - teams.permissions:write
- Scope - teams:*
Raises:
ValueError- Missed specifying a necessary valueException- Unspecified error by executing the API call
Returns:
api_calllist - Returns the external groups
remove_external_group
def remove_external_group(team_id: int, group_id: str)
The method includes a functionality to remove the corresponding external groups specified by the team id and group id
Arguments:
team_idint - Specify the team idgroup_idstr - Specify the group id (e.g. cn=editors,ou=groups,dc=grafana,dc=org)
Required Permissions:
- Action - teams.permissions:write
- Scope - teams:*
Raises:
ValueError- Missed specifying a necessary valueException- Unspecified error by executing the API call
Returns:
api_calllist - Returns the external groups