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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Scio-Actas
string

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

Body

application/json
preview structured text request
text
string
required
Example:

"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

200
application/json
OK
structuredText
object
required
combinedAnswerText
object
required
docsInaccessibleToUser
string[]

A list of links the user doesn't have access to.