Indexing API
- Documents
- Permissions
- Troubleshooting
- Datasources
- Authentication
- People
- Shortcuts
Client API
- Activity
- Announcements
- Answers
- Authentication
- Calendar
- Chat
- Agents
- Collections
- Displayable Lists
- Documents
- Images
- Insights
- Messages
- Pins
- Search
- Entities
- Shortcuts
- Summarize
- Tools
- User
- Verification
Actions API
- Authentication
- Setup
Read teams
Read the details of the teams with the given IDs.
curl --request POST \
--url https://{domain}-be.glean.com/rest/api/v1/teams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ids": [
"abc123"
]
}'
{
"results": [
{
"relatedObjects": {},
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": "<string>",
"name": "<string>",
"description": "<string>",
"businessUnit": "<string>",
"department": "<string>",
"photoUrl": "<string>",
"bannerUrl": "<string>",
"externalLink": "<string>",
"members": [
{
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"relationship": "MEMBER",
"customRelationshipStr": "<string>",
"joinDate": "2023-11-07T05:31:56Z"
}
],
"memberCount": 123,
"emails": [
{
"email": "jsmith@example.com",
"type": "OTHER",
"isUserGenerated": true
}
],
"datasourceProfiles": [
{
"datasource": "github",
"handle": "<string>",
"url": "<string>",
"nativeAppUrl": "<string>",
"isUserGenerated": true
}
],
"datasource": "<string>",
"createdFrom": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"status": "PROCESSED",
"canBeDeleted": true,
"loggingId": "<string>"
}
],
"errors": [
"<string>"
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).
Auth type being used to access the endpoint (should be non-empty only for global tokens).
Body
The IDs of the teams to retrieve.
List of teams fields to return that aren't returned by default
TEAMS_DETAILS
Response
A Team and a deep copy of all its members for each ID in the request
Unique identifier
Team name
A description of the team
Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses.
An organizational unit where everyone has a similar task, e.g. Engineering
.
A link to the team's photo.
A link to the team's banner photo.
Link to a team page on the internet or your company's intranet
The members on this team
Metadata about the relationship of a person to a team.
The display name.
An opaque identifier that can be used to request metadata for a Person.
A list of documents related to this person.
How this document relates to the including entity.
ATTACHMENT
, CANONICAL
, CASE
, CONTACT
, CONVERSATION_MESSAGES
, EXPERT
, FROM
, HIGHLIGHT
, OPPORTUNITY
, RECENT
, SOURCE
, TICKET
, TRANSCRIPT
, WITH
Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers)
{
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
}
A truncated list of documents with this relation. TO BE DEPRECATED.
A truncated list of documents associated with this relation. To be used in favor of documents
because it contains a trackingToken.
FULL_TIME
, CONTRACTOR
, NON_EMPLOYEE
, FORMER_EMPLOYEE
"FULL_TIME"
The first name of the person
The last name of the person
Job title.
Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses.
An organizational unit where everyone has a similar task, e.g. Engineering
.
Info about the employee's team(s).
Use id
if you index teams via Glean, and use name
and externalLink
if you want to use your own team pages
The number of people in this person's department.
The user's primary email address
Additional email addresses of this user beyond the primary, if any.
User facing string representing the person's location.
Detailed location with information about country, state, city etc.
Link to a customer's internal profile page. This is set to '#' when no link is desired.
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager.
Phone number as a number string.
The timezone of the person. E.g. "Pacific Daylight Time".
The offset of the person's timezone in seconds from UTC.
The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs).
The original photo URL of the person's avatar before any edits they made are applied
The URL of the person's banner photo.
The date when the employee started.
If a former employee, the last date of employment.
Short biography or mission statement of the employee.
She/her, He/his or other pronoun.
The total recursive size of the people reporting to this person, or 1
The total number of people who directly report to this person, or 0
The preferred name of the person, or a nickname.
List of social network profiles.
List of profiles this user has in different datasources / tools that they use.
List of people and distances to those people from this person. Optionally with metadata.
Information regarding the invite status of a person.
Whether the user has signed into Glean at least once.
The last time the user has used the Glean extension in ISO 8601 format.
Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes.
User customizable fields for additional people information.
The logging id of the person used in scrubbed logs, tracking GA metrics.
Percentage of the company that started strictly after this person. Between [0,100).
Intervals of busy time for this person, along with the type of event they're busy with.
A generic, light-weight calendar event.
flag settings to indicate user profile settings for certain items
The badges that a user has earned over their lifetime.
Displays a user's accomplishment or milestone
Whether this person is a "root" node in their organization's hierarchy.
{
"department": "Movies",
"email": "george@example.com",
"location": "Hollywood, CA",
"phone": 6505551234,
"photoUrl": "https://example.com/george.jpg",
"startDate": "2000-01-23",
"title": "Actor"
}
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
The team member's relationship to the team. This defaults to MEMBER if not set.
MEMBER
, MANAGER
, LEAD
, POINT_OF_CONTACT
, OTHER
Displayed name for the relationship if relationship is set to OTHER
.
The team member's start date
Number of members on this team (recursive; includes all individuals that belong to this team, and all individuals that belong to a subteam within this team)
The emails for this team
The datasource profiles of the team
The datasource the profile is of.
"github"
The display name of the entity in the given datasource.
URL to view the entity's profile.
A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...).
For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source)
the data source of the team, e.g. GDRIVE
For teams created from docs, the doc title. Otherwise empty.
when this team was last updated.
whether this team is fully processed or there are still unprocessed operations that'll affect it
PROCESSED
, QUEUED_FOR_CREATION
, QUEUED_FOR_DELETION
can this team be deleted. Some manually ingested teams like GCS_CSV or PUSH_API cannot
The logging id of the team used in scrubbed logs, client analytics, and metrics.
A list of objects related to a source object.
The permissions the current viewer has with respect to a particular object.
Describes the write permissions levels that a user has for a specific feature
Describes the scope for a ReadPermission, WritePermission, or GrantPermission object
GLOBAL
, OWN
True if user has create permission for this feature and scope
True if user has update permission for this feature and scope
True if user has delete permission for this feature and scope
A list of IDs that could not be found.
curl --request POST \
--url https://{domain}-be.glean.com/rest/api/v1/teams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"ids": [
"abc123"
]
}'
{
"results": [
{
"relatedObjects": {},
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": "<string>",
"name": "<string>",
"description": "<string>",
"businessUnit": "<string>",
"department": "<string>",
"photoUrl": "<string>",
"bannerUrl": "<string>",
"externalLink": "<string>",
"members": [
{
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"relationship": "MEMBER",
"customRelationshipStr": "<string>",
"joinDate": "2023-11-07T05:31:56Z"
}
],
"memberCount": 123,
"emails": [
{
"email": "jsmith@example.com",
"type": "OTHER",
"isUserGenerated": true
}
],
"datasourceProfiles": [
{
"datasource": "github",
"handle": "<string>",
"url": "<string>",
"nativeAppUrl": "<string>",
"isUserGenerated": true
}
],
"datasource": "<string>",
"createdFrom": "<string>",
"lastUpdatedAt": "2023-11-07T05:31:56Z",
"status": "PROCESSED",
"canBeDeleted": true,
"loggingId": "<string>"
}
],
"errors": [
"<string>"
]
}