Method: projects.list

Lists projects that are direct children of the specified folder or organization resource. list() provides a strongly consistent view of the projects underneath the specified parent resource. list() returns projects sorted based upon the (ascending) lexical ordering of their displayName. The caller must have resourcemanager.projects.list permission on the identified parent.

HTTP request

GET https://cloudresourcemanager.googleapis.com/v3/projects

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
parent

string

Required. The name of the parent resource whose projects are being listed. Only children of this parent resource are listed; descendants are not listed.

If the parent is a folder, use the value folders/{folder_id}. If the parent is an organization, use the value organizations/{org_id}.

Authorization requires the following IAM permission on the specified resource parent:

  • resourcemanager.projects.list
pageToken

string

Optional. A pagination token returned from a previous call to projects.list that indicates from where listing should continue.

pageSize

integer

Optional. The maximum number of projects to return in the response. The server can return fewer projects than requested. If unspecified, server picks an appropriate default.

showDeleted

boolean

Optional. Indicate that projects in the DELETE_REQUESTED state should also be returned. Normally only ACTIVE projects are returned.

Request body

The request body must be empty.

Response body

A page of the response received from the projects.list method.

A paginated response where more pages are available has nextPageToken set. This token can be used in a subsequent request to retrieve the next request page.

NOTE: A response may contain fewer elements than the request pageSize and still have a nextPageToken.

If successful, the response body contains data with the following structure:

JSON representation
{
  "projects": [
    {
      object (Project)
    }
  ],
  "nextPageToken": string
}
Fields
projects[]

object (Project)

The list of Projects under the parent. This list can be paginated.

nextPageToken

string

Pagination token.

If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the pageToken parameter gives the next page of the results.

When nextPageToken is not filled in, there is no next page and the list returned is the last page in the result set.

Pagination tokens have a limited lifetime.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/cloudplatformprojects
  • https://www.googleapis.com/auth/cloudplatformprojects.readonly

For more information, see the Authentication Overview.