curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/autocomplete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "trackingToken": "trackingToken",
  "query": "what is a que",
  "datasource": "GDRIVE",
  "resultSize": 10
}'
{
  "trackingToken": "trackingToken"
}

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
Autocomplete request
trackingToken
string
sessionInfo
object
query
string

Partially typed query.

Example:

"San Fra"

datasourcesFilter
string[]

Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). Results are unfiltered if missing.

datasource
string

Filter to only return results relevant to the given datasource.

resultTypes
enum<string>[]

Filter to only return results of the given type(s). All types may be returned if omitted.

Available options:
ADDITIONAL_DOCUMENT,
APP,
BROWSER_HISTORY,
DATASOURCE,
DOCUMENT,
ENTITY,
GOLINK,
HISTORY,
NEW_CHAT,
OPERATOR,
OPERATOR_VALUE,
QUICKLINK,
SUGGESTION
resultSize
integer

Maximum number of results to be returned. If no value is provided, the backend will cap at 200.

Example:

10

authTokens
object[]

Auth tokens which may be used for federated results.

Response

200
application/json
OK
trackingToken
string

An opaque token that represents this particular set of autocomplete results. To be used for /feedback reporting.

sessionInfo
object
results
object[]
groups
object[]

Subsections of the results list from which distinct sections should be created.

A subsection of the results list from which distinct sections should be created.

errorInfo
object
backendTimeMillis
integer

Time in milliseconds the backend took to respond to the request.

Example:

1100

experimentIds
integer[]

List of experiment ids for the corresponding request.