Gets a list of ancestors in the resource hierarchy for the Project identified by the specified projectId (for example, my-project-123).
The caller must have read permissions for this Project.
HTTP request
POST https://cloudresourcemanager.googleapis.com/v1beta1/projects/{projectId}:getAncestry
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
projectId |
Required. The Project ID (for example, Authorization requires the following IAM permission on the specified resource
|
Request body
The request body must be empty.
Response body
Response from the projects.getAncestry method.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"ancestor": [
{
object ( |
| Fields | |
|---|---|
ancestor[] |
Ancestors are ordered from bottom to top of the resource hierarchy. The first ancestor is the project itself, followed by the project's parent, etc. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/cloud-platform.read-onlyhttps://www.googleapis.com/auth/cloudplatformprojectshttps://www.googleapis.com/auth/cloudplatformprojects.readonly
For more information, see the Authentication Overview.
Ancestor
Identifying information for a single ancestor of a project.
| JSON representation |
|---|
{
"resourceId": {
object ( |
| Fields | |
|---|---|
resourceId |
Resource id of the ancestor. |