Get Started
Indexing
- Get Started
- Guides
- Authentication
- Datasources
- Documents
- Debugging
- API Reference
- OpenAPI Spec
Client
- Get Started
- Guides
- Search
- Governance
- API Reference
- Activity
- Announcements
- Answers
- Authentication
- Chat
- Agents
- Collections
- Documents
- Insights
- Messages
- Pins
- Search
- Entities
- Shortcuts
- Summarize
- Verification
- Tools
- Governance
- OpenAPI Spec
Web SDK
- Get Started
- Components
- Guides
Actions
- Get Started
- Examples
Entities
List entities
List some set of details for all entities that fit the given criteria and return in the requested order. Does not support negation in filters, assumes relation type EQUALS. There is a limit of 10000 entities that can be retrieved via this endpoint.
POST
/
rest
/
api
/
v1
/
listentities
Copy
Ask AI
from glean.api_client import Glean, models
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
instance=os.getenv("GLEAN_INSTANCE", ""),
) as glean:
res = glean.client.entities.list(filter_=[
{
"field_name": "type",
"values": [
{
"value": "Spreadsheet",
"relation_type": models.RelationType.EQUALS,
},
{
"value": "Presentation",
"relation_type": models.RelationType.EQUALS,
},
],
},
], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100)
# Handle response
print(res)
Copy
Ask AI
{
"results": [
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
],
"teamResults": [
{
"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": "PRIMARY",
"isUserGenerated": true
}
],
"customFields": [
{
"label": "<string>",
"values": [
{
"strText": "<string>"
}
],
"displayable": 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>"
}
],
"customEntityResults": [
{
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": "<string>",
"title": "<string>",
"datasource": "<string>",
"objectType": "<string>",
"metadata": {
"customData": {}
},
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
}
],
"facetResults": [
{
"sourceName": "container_name",
"operatorName": "SelectMultiple",
"buckets": [
{
"count": 1,
"datasource": "jira",
"percentage": 5,
"value": {
"stringValue": "engineering",
"integerValue": 5,
"displayLabel": "engineering",
"iconConfig": {
"color": "#343CED",
"key": "person_icon",
"iconType": "GLYPH",
"name": "user"
}
}
}
],
"hasMoreBuckets": false,
"groupName": "Service Cloud"
}
],
"cursor": "<string>",
"totalCount": 123,
"hasMoreResults": true,
"sortOptions": [
"ENTITY_NAME"
],
"customFacetNames": [
"<string>"
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
List people request
The body is of type object
.
Response
200
application/json
OK
The response is of type object
.
Was this page helpful?
Copy
Ask AI
from glean.api_client import Glean, models
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
instance=os.getenv("GLEAN_INSTANCE", ""),
) as glean:
res = glean.client.entities.list(filter_=[
{
"field_name": "type",
"values": [
{
"value": "Spreadsheet",
"relation_type": models.RelationType.EQUALS,
},
{
"value": "Presentation",
"relation_type": models.RelationType.EQUALS,
},
],
},
], entity_type=models.ListEntitiesRequestEntityType.PEOPLE, page_size=100)
# Handle response
print(res)
Copy
Ask AI
{
"results": [
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
],
"teamResults": [
{
"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": "PRIMARY",
"isUserGenerated": true
}
],
"customFields": [
{
"label": "<string>",
"values": [
{
"strText": "<string>"
}
],
"displayable": 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>"
}
],
"customEntityResults": [
{
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": "<string>",
"title": "<string>",
"datasource": "<string>",
"objectType": "<string>",
"metadata": {
"customData": {}
},
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
}
],
"facetResults": [
{
"sourceName": "container_name",
"operatorName": "SelectMultiple",
"buckets": [
{
"count": 1,
"datasource": "jira",
"percentage": 5,
"value": {
"stringValue": "engineering",
"integerValue": 5,
"displayLabel": "engineering",
"iconConfig": {
"color": "#343CED",
"key": "person_icon",
"iconType": "GLYPH",
"name": "user"
}
}
}
],
"hasMoreBuckets": false,
"groupName": "Service Cloud"
}
],
"cursor": "<string>",
"totalCount": 123,
"hasMoreResults": true,
"sortOptions": [
"ENTITY_NAME"
],
"customFacetNames": [
"<string>"
]
}
Assistant
Responses are generated using AI and may contain mistakes.