---
title: "POST /v1/debug/datasources/{datasourcesId}/items/{itemsId}:checkAccess"
method: POST
path: "/v1/debug/datasources/{datasourcesId}/items/{itemsId}:checkAccess"
tags: ["debug"]
---

# POST /v1/debug/datasources/{datasourcesId}/items/{itemsId}:checkAccess

`POST /v1/debug/datasources/{datasourcesId}/items/{itemsId}:checkAccess`

## Request

- Base URL: `https://cloudsearch.googleapis.com`
- URL: `https://cloudsearch.googleapis.com/v1/debug/datasources/{datasourcesId}/items/{itemsId}:checkAccess`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud_search`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud_search`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud_search.debug`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud_search.debug`

Checks whether an item is accessible by specified principal. Principal must be a user; groups and domain values aren't supported. **Note:** This API requires an admin account to execute.

## Path parameters

- `datasourcesId` string, required
- `itemsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `debugOptions.enableDebugging` boolean

## Request body

- Principal: Reference to a user, group, or domain.
  - `groupResourceName` string: This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID}
  - `gsuitePrincipal` GSuitePrincipal
    - `gsuiteDomain` boolean: This principal represents all users of the Google Workspace domain of the customer.
    - `gsuiteGroupEmail` string: This principal references a Google Workspace group name.
    - `gsuiteUserEmail` string: This principal references a Google Workspace user account.
  - `userResourceName` string: This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID}

## Response `200`

Successful response

- CheckAccessResponse
  - `hasAccess` boolean: Returns true if principal has access. Returns false otherwise.

## Changes

- **2026-12-04** `e6b5623d031d`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud_search.debug` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search.debug` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-09** `b2f1256e48fb`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud_search.debug` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud_search.debug` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/cloudsearch/changes/v1/debug/datasources/:datasourcesId/items/:itemsId:checkAccess/post.md)

---

[API](https://skmtc.dev/google/apis/cloudsearch.md) - [All operations](https://skmtc.dev/google/apis/cloudsearch/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/cloudsearch/revisions/e6b5623d031d?raw)
