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

# Beta: Get document information

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

Gives various information that would help in debugging related to a particular document. 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

- DebugDocumentRequest — Describes the request body of the /debug/{datasource}/document API call.
  - `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

- 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-api-2.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-api-2/versions/c4ae998a3802/schema)
