from .base import Base
[docs]class Ldap(Base):
[docs] def get_ldap_groups(self, params=None):
"""Returns a list of LDAP groups
q: Search term
page: The page to select.
per_page: The number of users per page. per page.
`Read in Mattermost API docs (ldap - GetLdapGroups) <https://api.mattermost.com/#tag/ldap/operation/GetLdapGroups>`_
"""
return self.client.get("""/api/v4/ldap/groups""", params=params)
[docs] def link_ldap_group(self, remote_id):
"""Link a LDAP group
remote_id: Group GUID
`Read in Mattermost API docs (ldap - LinkLdapGroup) <https://api.mattermost.com/#tag/ldap/operation/LinkLdapGroup>`_
"""
return self.client.post(f"/api/v4/ldap/groups/{remote_id}/link")