Method: billingAccounts.projects.list

Lists the projects associated with a billing account. The current authenticated user must have the billing.resourceAssociations.list IAM permission, which is often given to billing account viewers.

HTTP request

GET https://cloudbilling.googleapis.com/v1/{name=billingAccounts/*}/projects

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the billing account associated with the projects that you want to list. For example, billingAccounts/012345-567890-ABCDEF.

Query parameters

Parameters
pageSize

integer

Requested page size. The maximum page size is 100; this is also the default.

pageToken

string

A token identifying a page of results to be returned. This should be a nextPageToken value returned from a previous projects.list call. If unspecified, the first page of results is returned.

Request body

The request body must be empty.

Response body

Request message for ListProjectBillingInfoResponse.

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

JSON representation
{
  "projectBillingInfo": [
    {
      object (ProjectBillingInfo)
    }
  ],
  "nextPageToken": string
}
Fields
projectBillingInfo[]

object (ProjectBillingInfo)

A list of ProjectBillingInfo resources representing the projects associated with the billing account.

nextPageToken

string

A token to retrieve the next page of results. To retrieve the next page, call projects.list again with the pageToken field set to this value. This field is empty if there are no more results to retrieve.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-billing
  • https://www.googleapis.com/auth/cloud-billing.readonly

For more information, see the Authentication Overview.