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 to list projects under.

For example, setting this field to 'folders/1234' would list all projects directly under that folder.

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

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

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.

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.