In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.

Usage guidelines

This API is evolving fast. Glean will provide advance notice of any planned backwards incompatible changes along with a 6-month sunset period for anything that requires developers to adopt the new versions.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.9.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen


Python >=3.6

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
AuthenticationApi rotatetoken_post POST /rotatetoken Rotate token
DatasourcesApi adddatasource_post POST /adddatasource Add or update datasource
DatasourcesApi getdatasourceconfig_post POST /getdatasourceconfig Get datasource config
DocumentsApi bulkindexdocuments_post POST /bulkindexdocuments Bulk index documents
DocumentsApi deletedocument_post POST /deletedocument Delete document
DocumentsApi getdocumentcount_post POST /getdocumentcount Get document count
DocumentsApi getdocumentstatus_post POST /getdocumentstatus Get document upload and indexing status
DocumentsApi indexdocument_post POST /indexdocument Index document
DocumentsApi processalldocuments_post POST /processalldocuments Schedules the processing of uploaded documents
PeopleApi bulkindexemployees_post POST /bulkindexemployees Bulk index employees
PeopleApi bulkindexteams_post POST /bulkindexteams Bulk index teams
PeopleApi deleteemployee_post POST /deleteemployee Delete employee
PeopleApi deleteteam_post POST /deleteteam Delete team
PeopleApi indexemployee_post POST /indexemployee Index employee
PeopleApi indexemployeelist_post POST /indexemployeelist Bulk index employees
PeopleApi indexteam_post POST /indexteam Index team
PeopleApi processallemployeesandteams_post POST /processallemployeesandteams Schedules the processing of uploaded employees and teams
PermissionsApi betausers_post POST /betausers Beta users
PermissionsApi bulkindexgroups_post POST /bulkindexgroups Bulk index groups
PermissionsApi bulkindexmemberships_post POST /bulkindexmemberships Bulk index memberships for a group
PermissionsApi bulkindexusers_post POST /bulkindexusers Bulk index users
PermissionsApi checkdocumentaccess_post POST /checkdocumentaccess Check document access
PermissionsApi deletegroup_post POST /deletegroup Delete group
PermissionsApi deletemembership_post POST /deletemembership Delete membership
PermissionsApi deleteuser_post POST /deleteuser Delete user
PermissionsApi getusercount_post POST /getusercount Get user count
PermissionsApi indexgroup_post POST /indexgroup Index group
PermissionsApi indexmembership_post POST /indexmembership Index membership
PermissionsApi indexuser_post POST /indexuser Index user
PermissionsApi processallmemberships_post POST /processallmemberships Schedules the processing of group memberships
ShortcutsApi bulkindexshortcuts_post POST /bulkindexshortcuts Bulk index external shortcuts
ShortcutsApi uploadshortcuts_post POST /uploadshortcuts Upload shortcuts

Documentation For Models

Documentation For Authorization


  • Type : Bearer authentication


Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in gleanindexingapiclient.apis and gleanindexingapiclient.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from glean_indexing_api_client.api.default_api import DefaultApi
  • from import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
import glean_indexing_api_client
from glean_indexing_api_client.apis import *
from glean_indexing_api_client.models import *