Method: projects.locations.searchAssignments
Deprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:
- Assignments created on the project will be returned if they exist.
- Otherwise assignments created on the closest ancestor will be returned.
- Assignments for different JobTypes will all be returned.
The same logic applies if the request is about a folder.
If the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).
Comparing to assignments.list, there are some behavior differences:
- permission on the assignee will be verified in this API.
- Hierarchy lookup (project->folder->organization) happens in this API.
- Parent here is
projects/*/locations/*
, instead of projects/*/locations/*reservations/*
.
Note "-" cannot be used for projects nor locations.
HTTP request
GET https://bigqueryreservation.googleapis.com/v1/{parent=projects/*/locations/*}:searchAssignments
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. The resource name of the admin project(containing project and location), e.g.: projects/myproject/locations/US .
Authorization requires the following IAM permission on the specified resource parent :
bigquery.reservationAssignments.search
|
Query parameters
Parameters |
query |
string
Please specify resource name as assignee in the query. Examples:
assignee=projects/myproject
assignee=folders/123
assignee=organizations/456
|
pageSize |
integer
The maximum number of items to return per page.
|
pageToken |
string
The nextPageToken value returned from a previous List request, if any.
|
Request body
The request body must be empty.
Response body
The response for ReservationService.SearchAssignments
.
If successful, the response body contains data with the following structure:
JSON representation |
{
"assignments": [
{
object (Assignment )
}
],
"nextPageToken": string
} |
Fields |
assignments[] |
object (Assignment )
List of assignments visible to the user.
|
nextPageToken |
string
Token to retrieve the next page of results, or empty if there are no more results in the list.
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/bigquery
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-07-02 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-07-02 UTC."],[[["\u003cp\u003eThis API endpoint searches for assignments related to a specified resource within a particular region, considering hierarchy (project, folder, organization) for assignment retrieval.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a \u003ccode\u003eGET\u003c/code\u003e operation to a URL following gRPC Transcoding syntax, requiring a \u003ccode\u003eparent\u003c/code\u003e path parameter in the format \u003ccode\u003eprojects/*/locations/*\u003c/code\u003e, which is the admin project and location.\u003c/p\u003e\n"],["\u003cp\u003eThe API supports query parameters, including \u003ccode\u003equery\u003c/code\u003e to specify the assignee's resource name (e.g., projects, folders, organizations), \u003ccode\u003epageSize\u003c/code\u003e for controlling the number of items per page, and \u003ccode\u003epageToken\u003c/code\u003e for pagination.\u003c/p\u003e\n"],["\u003cp\u003eThe response body contains a list of assignments visible to the user, along with a \u003ccode\u003enextPageToken\u003c/code\u003e if there are more results, and the request body must be empty.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ebigquery.reservationAssignments.search\u003c/code\u003e IAM permission and either the \u003ccode\u003ehttps://www.googleapis.com/auth/bigquery\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.searchAssignments\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 - [JSON representation](#body.SearchAssignmentsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\n| This item is deprecated!\nDeprecated: Looks up assignments for a specified resource for a particular region. If the request is about a project:\n\n1. Assignments created on the project will be returned if they exist.\n2. Otherwise assignments created on the closest ancestor will be returned.\n3. Assignments for different JobTypes will all be returned.\n\nThe same logic applies if the request is about a folder.\n\nIf the request is about an organization, then assignments created on the organization will be returned (organization doesn't have ancestors).\n\nComparing to assignments.list, there are some behavior differences:\n\n1. permission on the assignee will be verified in this API.\n2. Hierarchy lookup (project-\\\u003efolder-\\\u003eorganization) happens in this API.\n3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`.\n\n**Note** \"-\" cannot be used for projects nor locations.\n\n### HTTP request\n\n`GET https://bigqueryreservation.googleapis.com/v1/{parent=projects/*/locations/*}:searchAssignments`\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\nThe response for [ReservationService.SearchAssignments](/bigquery/docs/reference/reservations/rest/v1/projects.locations/searchAssignments#google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments).\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/bigquery`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]