Indexing API
- Documents
- Permissions
- Troubleshooting
- Datasources
- Authentication
- People
- Shortcuts
Client API
- Activity
- Announcements
- POSTCreate Announcement
- POSTCreate draft Announcement
- POSTDelete Announcement
- POSTDelete draft Announcement
- POSTRead Announcement
- POSTRead draft Announcement
- POSTList Announcements
- POSTPreview Announcement
- POSTPreview draft Announcement
- POSTPublish draft Announcement
- POSTUnpublish Announcement
- POSTUpdate Announcement
- POSTUpdate draft Announcement
- POST
- Answers
- Authentication
- Calendar
- Chat
- Agents
- Collections
- Displayable Lists
- Documents
- Images
- Insights
- Messages
- Pins
- Search
- Entities
- Shortcuts
- Summarize
- Tools
- User
- Verification
Actions API
- Authentication
- Setup
Preview Announcement
Generate a preview for a user-generated Announcement from structured text.
curl --request POST \
--url https://{domain}-be.glean.com/rest/api/v1/previewannouncement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"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."
}'
{
"structuredText": {
"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": {
"id": "<string>",
"datasource": "<string>",
"connectorType": "API_CRAWL",
"docType": "<string>",
"content": {
"fullTextList": [
"<string>"
]
},
"containerDocument": {},
"parentDocument": {},
"title": "<string>",
"url": "<string>",
"metadata": {
"container": "container",
"parentId": "JIRA_EN-1337",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": {
"name": "name"
},
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "Feature Request",
"components": [
"Backend",
"Networking"
],
"status": [
"Done"
],
"customData": {
"someCustomField": "someCustomValue"
}
},
"sections": [
{
"title": "<string>",
"url": "<string>"
}
]
},
"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."
}
]
},
"docsInaccessibleToUser": [
"<string>"
],
"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": {
"id": "<string>",
"datasource": "<string>",
"connectorType": "API_CRAWL",
"docType": "<string>",
"content": {
"fullTextList": [
"<string>"
]
},
"containerDocument": {},
"parentDocument": {},
"title": "<string>",
"url": "<string>",
"metadata": {
"container": "container",
"parentId": "JIRA_EN-1337",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": {
"name": "name"
},
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "Feature Request",
"components": [
"Backend",
"Networking"
],
"status": [
"Done"
],
"customData": {
"someCustomField": "someCustomValue"
}
},
"sections": [
{
"title": "<string>",
"url": "<string>"
}
]
},
"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."
}
]
}
}
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
"From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."
Response
"From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."
An array of objects each of which contains either a string or a link which optionally corresponds to a document.
"https://en.wikipedia.org/wiki/Diffuse_sky_radiation"
The Glean Document ID.
The app or other repository type from which the document was extracted
The source from which document content was pulled, e.g. an API crawl or browser history
API_CRAWL
, BROWSER_CRAWL
, BROWSER_HISTORY
, BUILTIN
, FEDERATED_SEARCH
, PUSH_API
, WEB_CRAWL
, NATIVE_HISTORY
The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
The plaintext content of the document.
The title of the document.
A permalink for the document.
The datasource instance from which the document was extracted.
The type of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
The name of the container (higher level parent, not direct parent) of the result. Interpretation is specific to each datasource (e.g. Channels for Slack, Project for Jira). cf. parentId
The Glean Document ID of the container. Uniquely identifies the container.
The Glean Document ID of the super container. Super container represents a broader abstraction that contains many containers. For example, whereas container might refer to a folder, super container would refer to a drive.
The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container
The index-wide unique identifier.
A unique identifier used to represent the document in any logging or feedback requests in place of documentId.
Hash of the Glean Document ID.
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
A list of people mentioned in the document.
The level of visibility of the document as understood by our system.
PRIVATE
, SPECIFIC_PEOPLE_AND_GROUPS
, DOMAIN_LINK
, DOMAIN_VISIBLE
, PUBLIC_LINK
, PUBLIC_VISIBLE
A list of components this result is associated with. Interpretation is specific to each datasource. (e.g. for Jira issues, these are components.)
The status or disposition of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue status such as Done, In Progress or Will Not Fix).
The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource.
A list of stars associated with this result. "Pin" is an older name.
The document priority. Interpretation is datasource specific.
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
A list of tags for the document. Interpretation is datasource specific.
A list of collections that the document belongs to.
The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number).
A list of shortcuts of which destination URL is for the document.
For file datasources like onedrive/github etc this has the path to the file
Custom fields specific to individual datasources
The document's document_category(.proto).
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
A thumbnail image representing this document.
A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list.
{
"container": "container",
"parentId": "JIRA_EN-1337",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": { "name": "name" },
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "Feature Request",
"components": ["Backend", "Networking"],
"status": ["Done"],
"customData": { "someCustomField": "someCustomValue" }
}
A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.
"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."
"From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."
An array of objects each of which contains either a string or a link which optionally corresponds to a document.
"https://en.wikipedia.org/wiki/Diffuse_sky_radiation"
The Glean Document ID.
The app or other repository type from which the document was extracted
The source from which document content was pulled, e.g. an API crawl or browser history
API_CRAWL
, BROWSER_CRAWL
, BROWSER_HISTORY
, BUILTIN
, FEDERATED_SEARCH
, PUSH_API
, WEB_CRAWL
, NATIVE_HISTORY
The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
The plaintext content of the document.
The title of the document.
A permalink for the document.
The datasource instance from which the document was extracted.
The type of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue type such as Bug or Feature Request).
The name of the container (higher level parent, not direct parent) of the result. Interpretation is specific to each datasource (e.g. Channels for Slack, Project for Jira). cf. parentId
The Glean Document ID of the container. Uniquely identifies the container.
The Glean Document ID of the super container. Super container represents a broader abstraction that contains many containers. For example, whereas container might refer to a folder, super container would refer to a drive.
The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container
The index-wide unique identifier.
A unique identifier used to represent the document in any logging or feedback requests in place of documentId.
Hash of the Glean Document ID.
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
A list of people mentioned in the document.
The level of visibility of the document as understood by our system.
PRIVATE
, SPECIFIC_PEOPLE_AND_GROUPS
, DOMAIN_LINK
, DOMAIN_VISIBLE
, PUBLIC_LINK
, PUBLIC_VISIBLE
A list of components this result is associated with. Interpretation is specific to each datasource. (e.g. for Jira issues, these are components.)
The status or disposition of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue status such as Done, In Progress or Will Not Fix).
The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource.
A list of stars associated with this result. "Pin" is an older name.
The document priority. Interpretation is datasource specific.
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
A list of tags for the document. Interpretation is datasource specific.
A list of collections that the document belongs to.
The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number).
A list of shortcuts of which destination URL is for the document.
For file datasources like onedrive/github etc this has the path to the file
Custom fields specific to individual datasources
The document's document_category(.proto).
{
"name": "George Clooney",
"obfuscatedId": "abc123"
}
A thumbnail image representing this document.
A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list.
{
"container": "container",
"parentId": "JIRA_EN-1337",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": { "name": "name" },
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "Feature Request",
"components": ["Backend", "Networking"],
"status": ["Done"],
"customData": { "someCustomField": "someCustomValue" }
}
A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.
"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."
A list of links the user doesn't have access to.
curl --request POST \
--url https://{domain}-be.glean.com/rest/api/v1/previewannouncement \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"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."
}'
{
"structuredText": {
"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": {
"id": "<string>",
"datasource": "<string>",
"connectorType": "API_CRAWL",
"docType": "<string>",
"content": {
"fullTextList": [
"<string>"
]
},
"containerDocument": {},
"parentDocument": {},
"title": "<string>",
"url": "<string>",
"metadata": {
"container": "container",
"parentId": "JIRA_EN-1337",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": {
"name": "name"
},
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "Feature Request",
"components": [
"Backend",
"Networking"
],
"status": [
"Done"
],
"customData": {
"someCustomField": "someCustomValue"
}
},
"sections": [
{
"title": "<string>",
"url": "<string>"
}
]
},
"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."
}
]
},
"docsInaccessibleToUser": [
"<string>"
],
"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": {
"id": "<string>",
"datasource": "<string>",
"connectorType": "API_CRAWL",
"docType": "<string>",
"content": {
"fullTextList": [
"<string>"
]
},
"containerDocument": {},
"parentDocument": {},
"title": "<string>",
"url": "<string>",
"metadata": {
"container": "container",
"parentId": "JIRA_EN-1337",
"createTime": "2000-01-23T04:56:07.000Z",
"datasource": "datasource",
"author": {
"name": "name"
},
"documentId": "documentId",
"updateTime": "2000-01-23T04:56:07.000Z",
"mimeType": "mimeType",
"objectType": "Feature Request",
"components": [
"Backend",
"Networking"
],
"status": [
"Done"
],
"customData": {
"someCustomField": "someCustomValue"
}
},
"sections": [
{
"title": "<string>",
"url": "<string>"
}
]
},
"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."
}
]
}
}