POST
/
api
/
index
/
v1
/
debug
/
{datasource}
/
documents
from glean import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as g_client:

    res = g_client.indexing.documents.debug_many(datasource="<value>", debug_documents=[
        {
            "object_type": "Article",
            "doc_id": "art123",
        },
    ])

    # Handle response
    print(res)
{
  "documentStatuses": [
    {
      "docId": "<string>",
      "objectType": "<string>",
      "debugInfo": {
        "status": {
          "uploadStatus": "UPLOADED",
          "lastUploadedAt": "2021-08-06T17:58:01.000Z",
          "indexingStatus": "INDEXED",
          "lastIndexedAt": "2021-08-06T17:58:01.000Z",
          "permissionIdentityStatus": "UPLOADED"
        },
        "uploadedPermissions": {
          "allowedUsers": [
            {
              "email": "<string>",
              "datasourceUserId": "<string>",
              "name": "<string>"
            }
          ],
          "allowedGroups": [
            "<string>"
          ],
          "allowedGroupIntersections": [
            {
              "requiredGroups": [
                "<string>"
              ]
            }
          ],
          "allowAnonymousAccess": true,
          "allowAllDatasourceUsersAccess": true
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

datasource
string
required

The datasource to which the document belongs

Body

application/json; charset=UTF-8

Describes the request body of the /debug/{datasource}/documents API call.

Response

200
application/json; charset=UTF-8

OK

Describes the response body of a single document in the /debug/{datasource}/documents API call