from glean import Glean
import os


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

    res = g_client.indexing.documents.check_access(datasource="<value>", object_type="<value>", doc_id="<id>", user_email="<value>")

    # Handle response
    print(res)
{
  "hasAccess": true
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Describes the request body of the /checkdocumentaccess API call

Response

200
application/json
OK

Describes the response body of the /checkdocumentaccess API call