Documents

Batch get documents

Changed on

Retrieve up to 100 permission-visible indexed documents by URL or document_id. Found items are in results. Complete misses are warnings correlated by index. Incomplete store work fails the whole request. Retrieving search results is best-effort parity with legacy getdocuments. Gmail and Outlook caller-specific citation IDs are not accepted as document_id selectors. Use URL selectors for them. A Gmail or Outlook URL can still return a resource_not_found warning. Federated results and go-link shortcut documents are not retrievable in this release.

post/api/documents/batch

Request

  • Base URL: https://instance-name-be.glean.com
  • URL: https://instance-name-be.glean.com/api/documents/batch
  • Auth: HTTP bearer

Request body

includePlatformDocumentInclude[]

Optional field groups applied to every document in results. CONTENT adds content to every found document. Each value only adds fields; it does not change which documents are returned.

Example request

{
  "document_specs": [
    {
      "document_id": "{document_id}"
    },
    {
      "url": "https://company.atlassian.net/wiki/spaces/ENG/pages/12345"
    }
  ]
}

Response

Successful batch retrieval.

request_idstring required

Platform-generated request ID for support correlation.

Changes