curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/adminsearch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "trackingToken": "trackingToken",
  "query": "vacation policy",
  "pageSize": 10,
  "requestOptions": {
    "facetFilters": [
      {
        "fieldName": "type",
        "values": [
          {
            "value": "article",
            "relationType": "EQUALS"
          },
          {
            "value": "document",
            "relationType": "EQUALS"
          }
        ]
      },
      {
        "fieldName": "department",
        "values": [
          {
            "value": "engineering",
            "relationType": "EQUALS"
          }
        ]
      }
    ]
  }
}'
{
  "trackingToken": "trackingToken",
  "suggestedSpellCorrectedQuery": "suggestedSpellCorrectedQuery",
  "hasMoreResults": true,
  "errorInfo": {
    "errorMessages": [
      {
        "source": "gmail",
        "errorMessage": "invalid token"
      },
      {
        "source": "slack",
        "errorMessage": "expired token"
      }
    ]
  },
  "requestID": "5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100",
  "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://www.example.com/"
    },
    {
      "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://www.example.com/"
    }
  ],
  "facetResults": [
    {
      "buckets": [
        {
          "percentage": 5,
          "count": 1,
          "value": {
            "stringValue": "stringValue",
            "integerValue": 5
          }
        },
        {
          "percentage": 5,
          "count": 1,
          "value": {
            "stringValue": "stringValue",
            "integerValue": 5
          }
        }
      ],
      "sourceName": "sourceName",
      "operatorName": "operatorName",
      "objectType": "objectType"
    },
    {
      "buckets": [
        {
          "percentage": 5,
          "count": 1,
          "value": {
            "stringValue": "stringValue",
            "integerValue": 5
          }
        },
        {
          "percentage": 5,
          "count": 1,
          "value": {
            "stringValue": "stringValue",
            "integerValue": 5
          }
        }
      ],
      "sourceName": "sourceName",
      "operatorName": "operatorName",
      "objectType": "objectType"
    }
  ],
  "rewrittenQuery": "rewrittenQuery",
  "rewrittenFacetFilters": [
    {
      "fieldName": "fieldName",
      "values": [
        "fieldValues",
        "fieldValues"
      ]
    },
    {
      "fieldName": "fieldName",
      "values": [
        "fieldValues",
        "fieldValues"
      ]
    }
  ]
}

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
Admin search request
query
string
required

The search terms.

Example:

"vacation policy"

cursor
string

Pagination cursor. A previously received opaque token representing the position in the overall results at which to start.

resultTabIds
string[]

The unique IDs of the result tabs for which to fetch results. This will have precedence over datasource filters if both are specified and in conflict.

inputDetails
object
Example:
{ "hasCopyPaste": true }
requestOptions
object
Example:
{
  "datasourceFilter": "JIRA",
  "datasourcesFilter": ["JIRA"],
  "queryOverridesFacetFilters": true,
  "facetFilters": [
    {
      "fieldName": "fieldName",
      "values": ["fieldValues", "fieldValues"]
    },
    {
      "fieldName": "fieldName",
      "values": ["fieldValues", "fieldValues"]
    }
  ]
}
timeoutMillis
integer

Timeout in milliseconds for the request. A 408 error will be returned if handling the request takes longer.

Example:

5000

people
object[]

People associated with the search request. Hints to the server to fetch additional information for these people. Note that in this request, an email may be used as a person's obfuscatedId value.

disableSpellcheck
boolean

Whether or not to disable spellcheck.

timestamp
string

The ISO 8601 timestamp associated with the client request.

trackingToken
string

A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs.

sessionInfo
object
sourceDocument
object

The document from which the ResultsRequest is issued, if any.

pageSize
integer

Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize.

Example:

100

maxSnippetSize
integer

Hint to the server about how many characters long a snippet may be. Server may return less or more.

Example:

400

Response

200
application/json
OK
metadata
object
facetResults
object[]
resultTabs
object[]

All result tabs available for the current query. Populated if QUERY_METADATA is specified in the request.

resultTabIds
string[]

The unique IDs of the result tabs to which this response belongs.

resultsDescription
object
rewrittenFacetFilters
object[]

The actual applied facet filters based on the operators and facetFilters in the query. Useful for mapping typed operators to visual facets.

cursor
string

Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query.

hasMoreResults
boolean

Whether more results are available. Use cursor to retrieve them.

trackingToken
string

A token that should be passed for additional requests related to this request (such as more results requests).

sessionInfo
object
results
object[]
structuredResults
object[]

A single object that can support any object in the work graph. Only a single object will be populated.

generatedQnaResult
object
errorInfo
object
requestID
string

A platform-generated request ID to correlate backend logs.

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.