Перейти к консоли

Method: projects.availableLocations.list

Returns a list of valid Google Cloud Platform (GCP) resource locations for the specified Project (including a FirebaseProject).

The default GCP resource location of a project defines the geographical location where project resources, such as Cloud Firestore, will be provisioned by default.

The returned list are the available GCP resource locations.

This call checks for any location restrictions for the specified Project and, thus, might return a subset of all possible GCP resource locations. To list all GCP resource locations (regardless of any restrictions), call the endpoint without specifying a projectId (that is, /v1beta1/{parent=projects/-}/listAvailableLocations).

To call availableLocations.list with a specified project, a member must be at minimum a Viewer of the project. Calls without a specified project do not require any specific project permissions.

HTTP request

GET https://firebase.googleapis.com/v1beta1/{parent=projects/*}/availableLocations

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The Project for which to list GCP resource locations, in the format:

projects/projectId


If no project is specified (that is, projects/-), the returned list does not take into account org-specific or project-specific location restrictions.

Query parameters

Parameters
pageToken

string

Token returned from a previous call to availableLocations.list indicating where in the list of locations to resume listing.

pageSize

number

The maximum number of locations to return in the response.

The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit.

This value cannot be negative.

Request body

The request body must be empty.

Response body

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

JSON representation
{
  "locations": [
    {
      object (Location)
    }
  ],
  "nextPageToken": string
}
Fields
locations[]

object (Location)

One page of results from a call to availableLocations.list.

nextPageToken

string

If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results and all available locations have been listed.

This token can be used in a subsequent call to availableLocations.list to find more locations.

Page tokens are short-lived and should not be persisted.

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/firebase
  • https://www.googleapis.com/auth/firebase.readonly

For more information, see the Authentication Overview.

Location

A GCP resource location that can be selected for a Project.

JSON representation
{
  "locationId": string
}
Fields
locationId

string

The ID of the default GCP resource location. It must be one of the available GCP resource locations.

Try it!