Method: organizations.locations.entitlements.grants.search
grants.search
returns grants that are related to the calling user in the specified way.
HTTP request
GET https://privilegedaccessmanager.googleapis.com/v1beta/{parent=organizations/*/locations/*/entitlements/*}/grants:search
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. The parent which owns the grant resources.
|
Query parameters
Parameters |
callerRelationship |
enum (CallerRelationshipType )
Required. Only grants which the caller is related to by this relationship are returned in the response.
|
filter |
string
Optional. Only grants matching this filter are returned in the response.
|
pageSize |
integer
Optional. Requested page size. The server may return fewer items than requested. If unspecified, server picks an appropriate default.
|
pageToken |
string
Optional. A token identifying a page of results the server should return.
|
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of SearchGrantsResponse
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-21 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-21 UTC."],[[["\u003cp\u003eThis webpage details the \u003ccode\u003egrants.search\u003c/code\u003e function, which retrieves grants related to the calling user via a specified relationship.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses a \u003ccode\u003eGET\u003c/code\u003e method and requires a \u003ccode\u003eparent\u003c/code\u003e path parameter specifying the resource that owns the grant.\u003c/p\u003e\n"],["\u003cp\u003eThe function takes multiple optional query parameters, such as \u003ccode\u003efilter\u003c/code\u003e, \u003ccode\u003epageSize\u003c/code\u003e, and \u003ccode\u003epageToken\u003c/code\u003e, as well as one mandatory parameter, \u003ccode\u003ecallerRelationship\u003c/code\u003e, to refine the search results.\u003c/p\u003e\n"],["\u003cp\u003eAn empty request body is required, and a successful request returns a \u003ccode\u003eSearchGrantsResponse\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this function requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: organizations.locations.entitlements.grants.search\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\n`grants.search` returns grants that are related to the calling user in the specified way.\n\n### HTTP request\n\n`GET https://privilegedaccessmanager.googleapis.com/v1beta/{parent=organizations/*/locations/*/entitlements/*}/grants:search`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [SearchGrantsResponse](/iam/docs/reference/pam/rest/v1beta/SearchGrantsResponse).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]