---
title: "Beta: Get information of a batch of documents"
method: POST
path: "/api/index/v1/debug/{datasource}/documents"
tags: ["Troubleshooting"]
---

# Beta: Get information of a batch of documents

`POST /api/index/v1/debug/{datasource}/documents`

Gives various information that would help in debugging related to a batch of documents. Currently in beta, might undergo breaking changes without prior notice.

Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information.

## Path parameters

- `datasource` string, required

## Request body

- DebugDocumentsRequest — Describes the request body of the /debug/{datasource}/documents API call.
  - `debugDocuments` DebugDocumentRequest[], required — Documents to fetch debug information for
    - `objectType` string, required — Object type of the document to get the status for.
    - `docId` string, required — Glean Document ID within the datasource to get the status for.

## Response `200`

OK

- DebugDocumentsResponse — Describes the response body of a single document in the /debug/{datasource}/documents API call
  - `documentStatuses` DebugDocumentsResponseItem[] — List of document ids/urls and their debug information
    - `docId` string — Id of the document
    - `objectType` string — objectType of the document
    - `debugInfo` DebugDocumentResponse — Describes the response body of the /debug/{datasource}/document API call
      - `status` DocumentStatusResponse — Describes the document status response body
        - `uploadStatus` string — Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN
        - `lastUploadedAt` string — Time of last successful upload for the document, in ISO 8601 format
        - `indexingStatus` string — Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN
        - `lastIndexedAt` string — Time of last successful indexing for the document, in ISO 8601 format
        - `permissionIdentityStatus` string — Permission identity status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN (Always unknown if `identityDatasourceName` is set). Document visibility may be affected status is `NOT_UPLOADED`.
      - `uploadedPermissions` DocumentPermissionsDefinition — describes the access control details of the document
        - `allowedUsers` UserReferenceDefinition[] — List of users who can view the document
          - `email` string
          - `datasourceUserId` string — some datasources refer to the user by the datasource user id in the document
          - `name` string
        - `allowedGroups` string[] — List of groups that can view the document
        - `allowedGroupIntersections` PermissionsGroupIntersectionDefinition[] — List of allowed group intersections. This describes a permissions constraint of the form ((GroupA AND GroupB AND GroupC) OR (GroupX AND GroupY) OR ...
          - `requiredGroups` string[]
        - `allowAnonymousAccess` boolean — If true, then any Glean user can view the document
        - `allowAllDatasourceUsersAccess` boolean — If true, then any user who has an account in the datasource can view the document.

## Other responses

- `400` — Bad Request
- `401` — Not Authorized

---

[API](https://skmtc.net/gleanwork/apis/glean-indexing-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-indexing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-indexing-api/versions/1c92beda1a4f/schema)
