前往主控台

REST Resource: projects

Resource: FirebaseProject

A FirebaseProject is the top-level Firebase entity. It is the container for Firebase Apps, Firebase Hosting sites, storage systems (Firebase Realtime Database, Cloud Firestore, Cloud Storage buckets) and other Firebase and Google Cloud Platform (GCP) resources.

You can create a new FirebaseProject in the Firebase console, or you can add Firebase resources to an existing GCP Project by calling projects.addFirebase.

A FirebaseProject is actually also a GCP Project, so a FirebaseProject uses underlying GCP identifiers (most importantly, projectId) as its own for easy interop with GCP APIs.

JSON representation
{
  "name": string,
  "projectId": string,
  "projectNumber": string,
  "displayName": string,
  "resources": {
    object (DefaultResources)
  }
}
Fields
name

string

The fully qualified resource name of the Project, in the format:

projects/projectId

projectId

string

Immutable. The globally unique, user-assigned ID of the Project.

projectNumber

string (int64 format)

The globally unique, Google-assigned identifier of the Project.

displayName

string

The user-assigned display name of the Project.

resources

object (DefaultResources)

The default Firebase resources associated with the Project.

DefaultResources

The default resources associated with a FirebaseProject.

JSON representation
{
  "hostingSite": string,
  "realtimeDatabaseInstance": string,
  "storageBucket": string,
  "locationId": string
}
Fields
hostingSite

string

The default Firebase Hosting site name, in the format:

projectId


Though rare, your projectId might already be used as the name for an existing Hosting site in another project (learn more about creating non-default, additional sites). In these cases, your projectId is appended with a hyphen then five alphanumeric characters to create your default Hosting site name. For example, if your projectId is myproject123, your default Hosting site name might be:

myproject123-a5c16

realtimeDatabaseInstance

string

The default Firebase Realtime Database instance name, in the format:

projectId


Though rare, your projectId might already be used as the name for an existing Realtime Database instance in another project (learn more about database sharding). In these cases, your projectId is appended with a hyphen then five alphanumeric characters to create your default Realtime Database instance name. For example, if your projectId is myproject123, your default database instance name might be:

myproject123-a5c16

storageBucket

string

The default Cloud Storage for Firebase storage bucket, in the format:

projectId.appspot.com

locationId

string

The ID of the project's default GCP resource location. The location is one of the available GCP resource locations.

This field is omitted if the default GCP resource location has not been finalized yet. To set your project's default GCP resource location, call defaultLocation.finalize after you add Firebase services to your project.

Methods

addFirebase

Adds Firebase resources to the specified existing Google Cloud Platform (GCP) Project.

addGoogleAnalytics

Links a FirebaseProject with an existing Google Analytics account.

get

Gets the FirebaseProject identified by the specified resource name.

getAdminSdkConfig

Gets the configuration artifact used by servers to simplify initialization.

getAnalyticsDetails

Gets the Google Analytics details currently associated with a FirebaseProject.

list

Lists each FirebaseProject accessible to the caller.

patch

Updates the attributes of the FirebaseProject identified by the specified resource name.

removeAnalytics

Unlinks the specified FirebaseProject from its Google Analytics account.

searchApps

A convenience method that lists all available Apps for the specified FirebaseProject.