コンテンツにスキップ

API Endpoints

Glean leverages the following endpoints of the Google Drive and Google Directory APIs to crawl and index content. All connectivity is made through the scopes granted to the OAuth Client created within your Google Workspace.

Identity Endpoints

Endpoint Use Case Documentation Link
List users
https://admin.googleapis.com/admin/directory/v1/users
Determine which users (and associated content) need to be indexed. Method: users.list - Google Directory API
Retrieve user’s photo
https://admin.googleapis.com/admin/directory/v1/users/{userKey}/photos/thumbnail
Retrieve the specified user’s photo to populate their Glean profile. Method: users.photos.get - Google Directory API
List groups
https://admin.googleapis.com/admin/directory/v1/groups
Fetch all groups within a domain, or groups that a user is a member of (for permissions). Method: groups.list - Google Directory API
List group members
https://admin.googleapis.com/admin/directory/v1/groups/{groupKey}/members
Determine which users are a member of which group (for permissions). Method: members.list - Google Directory API

Content Endpoints

Endpoint Use Case Documentation Link
List a user’s shared Drives
https://www.googleapis.com/drive/v3/drives
Obtain a list of drives for a given user to iterate through. Method: drives.list - Google Drive API
Get a shared Drive’s metadata by ID
https://www.googleapis.com/drive/v3/drives/{driveId}
Fetch a Drive’s metadata for indexing. Method: drives.get - Google Drive API
List a user’s Drive information
https://www.googleapis.com/drive/v3/about
List the user’s files to determine the content to be indexed. Method: files.list - Google Drive API
Get file’s metadata or content by ID
https://www.googleapis.com/drive/v3/files/{fileId}
Get a file’s metadata for indexing. Method: files.get - Google Drive API
Export a Google Workspace document
https://www.googleapis.com/drive/v3/files/{fileId}/export
Fetch the exported byte content of a document in the specified MIME type for indexing and content parsing. Method: files.export - Google Drive API
List a file’s comments
https://www.googleapis.com/drive/v3/files/{fileId}/comments
List a file’s comments for indexing and activity. Method: comments.list - Google Drive API
List a file’s revisions
https://www.googleapis.com/drive/v3/files/{fileId}/revisions
List a file’s revisions for indexing and activity. Method: revisions.list - Google Drive API
List a file’s or shared drive’s permissions
https://www.googleapis.com/drive/v3/files/{fileId}/permissions
Get the access permissions of a given item within a drive or shared drive itself. Method: permissions.list - Google Drive API
Get the latest version of the specified document
https://docs.googleapis.com/v1/documents/{documentId}
Fetch the latest version of the specified document to display a preview to the user. Method: documents.get - Google Docs API
Get the latest version of the specified spreadsheet
https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}
Fetch the latest version of the specified spreadsheet to display a preview to the user. Method: spreadsheets.get - Google Sheets API
Get the latest version of the specified presentation
https://slides.googleapis.com/v1/presentations/{presentationId}
Fetch the latest version of the specified presentation to display a preview to the user. Method: presentations.get - Google Slides API

Activity Endpoints

Endpoint Use Case Documentation Link
Retrieve a list of user activities for Google Drive
https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/drive
Fetch activity data for each user for ranking signals and timely index updates. Method: activities.list - Reports API