Check document access

Check if a given user has access to access a document in a custom datasource

Tip: Refer to the Troubleshooting tutorial for more information.

SecurityBearerAuth
Request
Request Body schema: application/json
required
datasource
required
string

Datasource of document to check access for.

objectType
required
string

Object type of document to check access for.

docId
required
string

Glean Document ID to check access for.

userEmail
required
string

Email of user to check access for.

Responses
200

OK

Response Schema: application/json
hasAccess
boolean

If true, user has access to document for search

400

Bad Request

401

Not Authorized

429

Too Many Requests

post/checkdocumentaccess
Request samples
application/json
{
  • "datasource": "string",
  • "objectType": "string",
  • "docId": "string",
  • "userEmail": "string"
}
Response samples
application/json
{
  • "hasAccess": true
}