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
Search
Recommend documents
Retrieve recommended documents for the given URL or Glean Document ID.
POST
/
rest
/
api
/
v1
/
recommendations
from glean import Glean, models
from glean.utils import parse_datetime
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:
res = g_client.client.search.recommendations(request=models.RecommendationsRequest(
source_document=models.Document(
metadata=models.DocumentMetadata(
datasource="datasource",
object_type="Feature Request",
container="container",
parent_id="JIRA_EN-1337",
mime_type="mimeType",
document_id="documentId",
create_time=parse_datetime("2000-01-23T04:56:07.000Z"),
update_time=parse_datetime("2000-01-23T04:56:07.000Z"),
author=models.Person(
name="name",
obfuscated_id="<id>",
),
components=[
"Backend",
"Networking",
],
status="[\"Done\"]",
custom_data={
"someCustomField": models.CustomDataValue(),
},
),
),
page_size=100,
max_snippet_size=400,
request_options=models.RecommendationsRequestOptions(
facet_filter_sets=[
models.FacetFilterSet(
filters=[
models.FacetFilter(
field_name="type",
values=[
models.FacetFilterValue(
value="Spreadsheet",
relation_type=models.RelationType.EQUALS,
),
models.FacetFilterValue(
value="Presentation",
relation_type=models.RelationType.EQUALS,
),
],
),
],
),
],
context=models.Document(
metadata=models.DocumentMetadata(
datasource="datasource",
object_type="Feature Request",
container="container",
parent_id="JIRA_EN-1337",
mime_type="mimeType",
document_id="documentId",
create_time=parse_datetime("2000-01-23T04:56:07.000Z"),
update_time=parse_datetime("2000-01-23T04:56:07.000Z"),
author=models.Person(
name="name",
obfuscated_id="<id>",
),
components=[
"Backend",
"Networking",
],
status="[\"Done\"]",
custom_data={
"someCustomField": models.CustomDataValue(),
},
),
),
),
))
assert res is not None
# Handle response
print(res)
{
"trackingToken": "<string>",
"sessionInfo": {
"sessionTrackingToken": "<string>",
"tabId": "<string>",
"lastSeen": "2023-11-07T05:31:56Z",
"lastQuery": "<string>"
},
"results": [
{
"snippets": [
{
"snippet": "snippet",
"mimeType": "mimeType"
}
],
"metadata": {
"container": "container",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": {
"name": "name"
},
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "objectType"
},
"title": "title",
"url": "https://example.com/foo/bar",
"nativeAppUrl": "slack://foo/bar",
"mustIncludeSuggestions": [
{
"missingTerm": "container",
"query": "container"
}
]
}
],
"structuredResults": [
{
"document": {},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"customer": {
"id": "<string>",
"domains": [
"<string>"
],
"company": {
"name": "<string>",
"profileUrl": "<string>",
"websiteUrls": [
"<string>"
],
"logoUrl": "<string>",
"location": "New York City",
"phone": "<string>",
"fax": "<string>",
"industry": "Finances",
"annualRevenue": 123,
"numberOfEmployees": 123,
"stockSymbol": "<string>",
"foundedDate": "2023-12-25",
"about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"
},
"documentCounts": {},
"poc": [
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
],
"metadata": {
"datasourceId": "<string>",
"customData": {}
},
"mergedCustomers": [
{}
],
"startDate": "2023-12-25",
"contractAnnualRevenue": 123,
"notes": "CIO is interested in trying out the product."
},
"team": {
"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>"
},
"customEntity": {
"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"
}
]
},
"answer": {
"id": 3,
"docId": "ANSWERS_answer_3",
"question": "Why is the sky blue?",
"questionVariations": [
"<string>"
],
"bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
"boardId": 123,
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"sourceDocumentSpec": {
"url": "<string>"
},
"sourceType": "DOCUMENT",
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"combinedAnswerText": {
"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
"structuredList": [
{
"link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation",
"document": {},
"text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.",
"structuredResult": {}
}
]
},
"likes": {
"likedBy": [
{
"user": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z"
}
],
"likedByUser": true,
"numLikes": 123
},
"author": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"verification": {
"state": "UNVERIFIED",
"metadata": {
"lastVerifier": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"lastVerificationTs": 123,
"expirationTs": 123,
"document": {},
"reminders": [
{
"assignee": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"requestor": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"remindAt": 123,
"createdAt": 123,
"reason": "<string>"
}
],
"lastReminder": {
"assignee": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"requestor": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"remindAt": 123,
"createdAt": 123,
"reason": "<string>"
},
"visitorCount": [
{
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
}
],
"candidateVerifiers": [
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
]
}
},
"board": {
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"collections": [
{
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"icon": "<string>",
"adminLocked": true,
"parentId": 123,
"thumbnail": {
"photoId": "<string>",
"url": "<string>"
},
"allowedDatasource": "<string>",
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"childCount": 123,
"items": [
{
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"collectionId": 123,
"documentId": "<string>",
"url": "<string>",
"itemId": "<string>",
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createdAt": "2023-11-07T05:31:56Z",
"document": {},
"shortcut": {
"id": 123,
"inputAlias": "<string>",
"destinationUrl": "<string>",
"destinationDocumentId": "<string>",
"description": "<string>",
"unlisted": true,
"urlTemplate": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updateTime": "2023-11-07T05:31:56Z",
"destinationDocument": {},
"intermediateUrl": "<string>",
"viewPrefix": "<string>",
"isExternal": true,
"editUrl": "<string>",
"alias": "<string>",
"title": "<string>",
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"collection": "<any>",
"itemType": "DOCUMENT"
}
],
"pinMetadata": {
"existingPins": [
{
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
],
"eligiblePins": [
{
"id": 123,
"target": {
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
}
]
},
"shortcuts": [
"<string>"
],
"children": [
"<any>"
],
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
}
],
"documentCategory": "<string>",
"sourceDocument": {}
},
"extractedQnA": {
"heading": "<string>",
"question": "<string>",
"questionResult": "<any>"
},
"meeting": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"url": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"attendees": {
"people": [
{
"isOrganizer": true,
"isInGroup": true,
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"groupAttendees": [
{}
],
"responseStatus": "ACCEPTED"
}
],
"isLimit": true,
"total": 123,
"numAccepted": 123,
"numDeclined": 123,
"numNoResponse": 123,
"numTentative": 123
}
},
"app": {
"datasource": "<string>",
"docType": "<string>",
"mimeType": "<string>",
"iconUrl": "<string>"
},
"collection": {
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"icon": "<string>",
"adminLocked": true,
"parentId": 123,
"thumbnail": {
"photoId": "<string>",
"url": "<string>"
},
"allowedDatasource": "<string>",
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"childCount": 123,
"items": [
{
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"collectionId": 123,
"documentId": "<string>",
"url": "<string>",
"itemId": "<string>",
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createdAt": "2023-11-07T05:31:56Z",
"document": {},
"shortcut": {
"id": 123,
"inputAlias": "<string>",
"destinationUrl": "<string>",
"destinationDocumentId": "<string>",
"description": "<string>",
"unlisted": true,
"urlTemplate": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updateTime": "2023-11-07T05:31:56Z",
"destinationDocument": {},
"intermediateUrl": "<string>",
"viewPrefix": "<string>",
"isExternal": true,
"editUrl": "<string>",
"alias": "<string>",
"title": "<string>",
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"collection": "<any>",
"itemType": "DOCUMENT"
}
],
"pinMetadata": {
"existingPins": [
{
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
],
"eligiblePins": [
{
"id": 123,
"target": {
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
}
]
},
"shortcuts": [
"<string>"
],
"children": [
"<any>"
],
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"answerBoard": {
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"code": {
"repoName": "scio",
"fileName": "README.md",
"matches": [
{
"lineNumber": 1,
"content": "Welcome to the beginning",
"ranges": []
},
{
"lineNumber": 2,
"content": "Second line of the file",
"ranges": []
},
{
"lineNumber": 3,
"content": "hello world hello world",
"ranges": [
{
"startindex": 0,
"endIndex": 5
},
{
"startIndex": 12,
"endIndex": 17
}
]
}
]
},
"shortcut": {
"id": 123,
"inputAlias": "<string>",
"destinationUrl": "<string>",
"destinationDocumentId": "<string>",
"description": "<string>",
"unlisted": true,
"urlTemplate": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updateTime": "2023-11-07T05:31:56Z",
"destinationDocument": {},
"intermediateUrl": "<string>",
"viewPrefix": "<string>",
"isExternal": true,
"editUrl": "<string>",
"alias": "<string>",
"title": "<string>",
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"querySuggestions": {
"suggestions": [
{
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
}
],
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
}
},
"relatedDocuments": [
{}
],
"relatedQuestion": {
"question": "<string>",
"answer": "<string>",
"ranges": [
{
"startIndex": 123,
"endIndex": 123,
"type": "BOLD",
"url": "<string>",
"document": {}
}
]
},
"disambiguation": {
"name": "<string>",
"id": "<string>",
"type": "PERSON"
},
"snippets": [
{
"snippet": "snippet",
"mimeType": "mimeType"
}
],
"trackingToken": "<string>",
"prominence": "HERO",
"source": "EXPERT_DETECTION"
}
],
"generatedQnaResult": {
"question": "<string>",
"answer": "<string>",
"followUpPrompts": [
"<string>"
],
"followupActions": [
{
"actionRunId": "<string>",
"actionInstanceId": "<string>",
"actionId": "<string>",
"recommendationText": "<string>",
"actionLabel": "<string>",
"userConfirmationRequired": true
}
],
"ranges": [
{
"startIndex": 123,
"endIndex": 123,
"type": "BOLD",
"url": "<string>",
"document": {}
}
],
"status": "COMPUTING",
"cursor": "<string>",
"trackingToken": "<string>"
},
"errorInfo": {
"badGmailToken": true,
"badOutlookToken": true,
"invalidOperators": [
{
"key": "<string>",
"value": "<string>"
}
],
"errorMessages": [
{
"source": "<string>",
"errorMessage": "<string>"
}
]
},
"requestID": "<string>",
"backendTimeMillis": 1100
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Recommendations request
The body is of type object
.
Response
200
application/json
OK
The response is of type object
.
from glean import Glean, models
from glean.utils import parse_datetime
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:
res = g_client.client.search.recommendations(request=models.RecommendationsRequest(
source_document=models.Document(
metadata=models.DocumentMetadata(
datasource="datasource",
object_type="Feature Request",
container="container",
parent_id="JIRA_EN-1337",
mime_type="mimeType",
document_id="documentId",
create_time=parse_datetime("2000-01-23T04:56:07.000Z"),
update_time=parse_datetime("2000-01-23T04:56:07.000Z"),
author=models.Person(
name="name",
obfuscated_id="<id>",
),
components=[
"Backend",
"Networking",
],
status="[\"Done\"]",
custom_data={
"someCustomField": models.CustomDataValue(),
},
),
),
page_size=100,
max_snippet_size=400,
request_options=models.RecommendationsRequestOptions(
facet_filter_sets=[
models.FacetFilterSet(
filters=[
models.FacetFilter(
field_name="type",
values=[
models.FacetFilterValue(
value="Spreadsheet",
relation_type=models.RelationType.EQUALS,
),
models.FacetFilterValue(
value="Presentation",
relation_type=models.RelationType.EQUALS,
),
],
),
],
),
],
context=models.Document(
metadata=models.DocumentMetadata(
datasource="datasource",
object_type="Feature Request",
container="container",
parent_id="JIRA_EN-1337",
mime_type="mimeType",
document_id="documentId",
create_time=parse_datetime("2000-01-23T04:56:07.000Z"),
update_time=parse_datetime("2000-01-23T04:56:07.000Z"),
author=models.Person(
name="name",
obfuscated_id="<id>",
),
components=[
"Backend",
"Networking",
],
status="[\"Done\"]",
custom_data={
"someCustomField": models.CustomDataValue(),
},
),
),
),
))
assert res is not None
# Handle response
print(res)
{
"trackingToken": "<string>",
"sessionInfo": {
"sessionTrackingToken": "<string>",
"tabId": "<string>",
"lastSeen": "2023-11-07T05:31:56Z",
"lastQuery": "<string>"
},
"results": [
{
"snippets": [
{
"snippet": "snippet",
"mimeType": "mimeType"
}
],
"metadata": {
"container": "container",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": {
"name": "name"
},
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "objectType"
},
"title": "title",
"url": "https://example.com/foo/bar",
"nativeAppUrl": "slack://foo/bar",
"mustIncludeSuggestions": [
{
"missingTerm": "container",
"query": "container"
}
]
}
],
"structuredResults": [
{
"document": {},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"customer": {
"id": "<string>",
"domains": [
"<string>"
],
"company": {
"name": "<string>",
"profileUrl": "<string>",
"websiteUrls": [
"<string>"
],
"logoUrl": "<string>",
"location": "New York City",
"phone": "<string>",
"fax": "<string>",
"industry": "Finances",
"annualRevenue": 123,
"numberOfEmployees": 123,
"stockSymbol": "<string>",
"foundedDate": "2023-12-25",
"about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"
},
"documentCounts": {},
"poc": [
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
],
"metadata": {
"datasourceId": "<string>",
"customData": {}
},
"mergedCustomers": [
{}
],
"startDate": "2023-12-25",
"contractAnnualRevenue": 123,
"notes": "CIO is interested in trying out the product."
},
"team": {
"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>"
},
"customEntity": {
"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"
}
]
},
"answer": {
"id": 3,
"docId": "ANSWERS_answer_3",
"question": "Why is the sky blue?",
"questionVariations": [
"<string>"
],
"bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
"boardId": 123,
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"sourceDocumentSpec": {
"url": "<string>"
},
"sourceType": "DOCUMENT",
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"combinedAnswerText": {
"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
"structuredList": [
{
"link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation",
"document": {},
"text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.",
"structuredResult": {}
}
]
},
"likes": {
"likedBy": [
{
"user": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z"
}
],
"likedByUser": true,
"numLikes": 123
},
"author": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"verification": {
"state": "UNVERIFIED",
"metadata": {
"lastVerifier": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"lastVerificationTs": 123,
"expirationTs": 123,
"document": {},
"reminders": [
{
"assignee": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"requestor": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"remindAt": 123,
"createdAt": 123,
"reason": "<string>"
}
],
"lastReminder": {
"assignee": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"requestor": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"remindAt": 123,
"createdAt": 123,
"reason": "<string>"
},
"visitorCount": [
{
"count": 123,
"period": {
"minDaysFromNow": 123,
"maxDaysFromNow": 123,
"start": {
"epochSeconds": 123,
"daysFromNow": 123
},
"end": {
"epochSeconds": 123,
"daysFromNow": 123
}
},
"org": "<string>"
}
],
"candidateVerifiers": [
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
]
}
},
"board": {
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"collections": [
{
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"icon": "<string>",
"adminLocked": true,
"parentId": 123,
"thumbnail": {
"photoId": "<string>",
"url": "<string>"
},
"allowedDatasource": "<string>",
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"childCount": 123,
"items": [
{
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"collectionId": 123,
"documentId": "<string>",
"url": "<string>",
"itemId": "<string>",
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createdAt": "2023-11-07T05:31:56Z",
"document": {},
"shortcut": {
"id": 123,
"inputAlias": "<string>",
"destinationUrl": "<string>",
"destinationDocumentId": "<string>",
"description": "<string>",
"unlisted": true,
"urlTemplate": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updateTime": "2023-11-07T05:31:56Z",
"destinationDocument": {},
"intermediateUrl": "<string>",
"viewPrefix": "<string>",
"isExternal": true,
"editUrl": "<string>",
"alias": "<string>",
"title": "<string>",
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"collection": "<any>",
"itemType": "DOCUMENT"
}
],
"pinMetadata": {
"existingPins": [
{
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
],
"eligiblePins": [
{
"id": 123,
"target": {
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
}
]
},
"shortcuts": [
"<string>"
],
"children": [
"<any>"
],
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
}
],
"documentCategory": "<string>",
"sourceDocument": {}
},
"extractedQnA": {
"heading": "<string>",
"question": "<string>",
"questionResult": "<any>"
},
"meeting": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"url": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"attendees": {
"people": [
{
"isOrganizer": true,
"isInGroup": true,
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"groupAttendees": [
{}
],
"responseStatus": "ACCEPTED"
}
],
"isLimit": true,
"total": 123,
"numAccepted": 123,
"numDeclined": 123,
"numNoResponse": 123,
"numTentative": 123
}
},
"app": {
"datasource": "<string>",
"docType": "<string>",
"mimeType": "<string>",
"iconUrl": "<string>"
},
"collection": {
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"icon": "<string>",
"adminLocked": true,
"parentId": 123,
"thumbnail": {
"photoId": "<string>",
"url": "<string>"
},
"allowedDatasource": "<string>",
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"childCount": 123,
"items": [
{
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"collectionId": 123,
"documentId": "<string>",
"url": "<string>",
"itemId": "<string>",
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createdAt": "2023-11-07T05:31:56Z",
"document": {},
"shortcut": {
"id": 123,
"inputAlias": "<string>",
"destinationUrl": "<string>",
"destinationDocumentId": "<string>",
"description": "<string>",
"unlisted": true,
"urlTemplate": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updateTime": "2023-11-07T05:31:56Z",
"destinationDocument": {},
"intermediateUrl": "<string>",
"viewPrefix": "<string>",
"isExternal": true,
"editUrl": "<string>",
"alias": "<string>",
"title": "<string>",
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"collection": "<any>",
"itemType": "DOCUMENT"
}
],
"pinMetadata": {
"existingPins": [
{
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
],
"eligiblePins": [
{
"id": 123,
"target": {
"category": "COMPANY_RESOURCE",
"value": "<string>",
"target": "RESOURCE_CARD"
}
}
]
},
"shortcuts": [
"<string>"
],
"children": [
"<any>"
],
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"answerBoard": {
"name": "<string>",
"description": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"audienceFilters": [
{
"fieldName": "type",
"values": [
{
"value": "Spreadsheet",
"relationType": "EQUALS"
},
{
"value": "Presentation",
"relationType": "EQUALS"
}
]
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"id": 123,
"createTime": "2023-11-07T05:31:56Z",
"updateTime": "2023-11-07T05:31:56Z",
"creator": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"itemCount": 123,
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"code": {
"repoName": "scio",
"fileName": "README.md",
"matches": [
{
"lineNumber": 1,
"content": "Welcome to the beginning",
"ranges": []
},
{
"lineNumber": 2,
"content": "Second line of the file",
"ranges": []
},
{
"lineNumber": 3,
"content": "hello world hello world",
"ranges": [
{
"startindex": 0,
"endIndex": 5
},
{
"startIndex": 12,
"endIndex": 17
}
]
}
]
},
"shortcut": {
"id": 123,
"inputAlias": "<string>",
"destinationUrl": "<string>",
"destinationDocumentId": "<string>",
"description": "<string>",
"unlisted": true,
"urlTemplate": "<string>",
"addedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"removedRoles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
],
"permissions": {
"write": {
"scopeType": "GLOBAL",
"create": true,
"update": true,
"delete": true
}
},
"createdBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"createTime": "2023-11-07T05:31:56Z",
"updatedBy": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"updateTime": "2023-11-07T05:31:56Z",
"destinationDocument": {},
"intermediateUrl": "<string>",
"viewPrefix": "<string>",
"isExternal": true,
"editUrl": "<string>",
"alias": "<string>",
"title": "<string>",
"roles": [
{
"sourceDocumentSpec": {
"url": "<string>"
},
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
},
"group": {
"type": "DEPARTMENT",
"id": "<string>",
"name": "<string>"
},
"role": "OWNER"
}
]
},
"querySuggestions": {
"suggestions": [
{
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
}
],
"person": {
"name": "George Clooney",
"obfuscatedId": "abc123"
}
},
"relatedDocuments": [
{}
],
"relatedQuestion": {
"question": "<string>",
"answer": "<string>",
"ranges": [
{
"startIndex": 123,
"endIndex": 123,
"type": "BOLD",
"url": "<string>",
"document": {}
}
]
},
"disambiguation": {
"name": "<string>",
"id": "<string>",
"type": "PERSON"
},
"snippets": [
{
"snippet": "snippet",
"mimeType": "mimeType"
}
],
"trackingToken": "<string>",
"prominence": "HERO",
"source": "EXPERT_DETECTION"
}
],
"generatedQnaResult": {
"question": "<string>",
"answer": "<string>",
"followUpPrompts": [
"<string>"
],
"followupActions": [
{
"actionRunId": "<string>",
"actionInstanceId": "<string>",
"actionId": "<string>",
"recommendationText": "<string>",
"actionLabel": "<string>",
"userConfirmationRequired": true
}
],
"ranges": [
{
"startIndex": 123,
"endIndex": 123,
"type": "BOLD",
"url": "<string>",
"document": {}
}
],
"status": "COMPUTING",
"cursor": "<string>",
"trackingToken": "<string>"
},
"errorInfo": {
"badGmailToken": true,
"badOutlookToken": true,
"invalidOperators": [
{
"key": "<string>",
"value": "<string>"
}
],
"errorMessages": [
{
"source": "<string>",
"errorMessage": "<string>"
}
]
},
"requestID": "<string>",
"backendTimeMillis": 1100
}
Assistant
Responses are generated using AI and may contain mistakes.