Indexing API
- Documents
- Permissions
- Troubleshooting
- Datasources
- Authentication
- People
- Shortcuts
Client API
- Activity
- Announcements
- Answers
- Authentication
- Chat
- Agents
- Collections
- Documents
- Insights
- Messages
- Pins
- Search
- Entities
- Shortcuts
- Summarize
- Verification
Entities
List entities
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.
from glean import Glean, models
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:
res = g_client.client.entities.list(request={
"filter_": [
{
"field_name": "type",
"values": [
{
"value": "Spreadsheet",
"relation_type": models.RelationType.EQUALS,
},
{
"value": "Presentation",
"relation_type": models.RelationType.EQUALS,
},
],
},
],
"page_size": 100,
})
# Handle response
print(res)
{
"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.
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
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?
from glean import Glean, models
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:
res = g_client.client.entities.list(request={
"filter_": [
{
"field_name": "type",
"values": [
{
"value": "Spreadsheet",
"relation_type": models.RelationType.EQUALS,
},
{
"value": "Presentation",
"relation_type": models.RelationType.EQUALS,
},
],
},
],
"page_size": 100,
})
# Handle response
print(res)
{
"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>"
]
}