curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/getdocuments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "documentSpecs": [
    {
      "url": "<string>"
    }
  ],
  "includeFields": [
    "LAST_VIEWED_AT"
  ]
}'
{
  "documents": {}
}

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
Information about documents requested.
documentSpecs
object[]
required

The specification for the documents to be retrieved.

includeFields
enum<string>[]

List of Document fields to return (that aren't returned by default)

Available options:
LAST_VIEWED_AT,
VISITORS_COUNT,
RECENT_SHARES,
DOCUMENT_CONTENT

Response

200
application/json
OK
documents
object

The document details or the error if document is not found.