Read documents

post/getdocuments

Read the documents including metadata (does not include enhanced metadata via /documentmetadata) for the given list of Glean Document IDs or URLs specified in the request.

SecurityBearerAuth
Request
header Parameters
X-Glean-Auth-Type
string

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

X-Scio-Actas
string <email>

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

Request Body schema: application/json

Information about documents requested.

required
Array of objects or objects or objects (DocumentSpec)

The specification for the documents to be retrieved.

includeFields
Array of strings

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

Items Enum: "LAST_VIEWED_AT" "VISITORS_COUNT" "RECENT_SHARES" "DOCUMENT_CONTENT"
Responses
200

OK

Response Schema: application/json
object

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

400

Invalid request

401

Not Authorized

403

Documents does not exist, or user cannot access documents.

429

Too Many Requests

Request samples
application/json
{
  • "documentSpecs": [
    • {
      • "url": "string"
      }
    ],
  • "includeFields": [
    • "LAST_VIEWED_AT"
    ]
}
Response samples
application/json
{
  • "documents": {
    • "property1": {
      • "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"
          }
        ]
      },
    • "property2": {
      • "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"
          }
        ]
      }
    }
}