Zur Konsole

Firebase Management API

The Firebase Management API enables programmatic setup and management of Firebase projects, including a project's Firebase resources and Firebase apps.

Workflows: Set up and manage a Firebase project using the REST API

For programmatic setup of a FirebaseProject, you can add Firebase services to an existing Google Cloud Platform (GCP) Project. Then, when you have a FirebaseProject, you can add apps and set your default resource location.

To set up and manage a Firebase project, you can call the following REST endpoints.

For information about programmatic access management for these calls, visit the Cloud Identity Access Management (IAM) API documentation.

Add Firebase services to a GCP project

  1. Find the resource name of the existing Google Cloud Platform (GCP) Project to which you want to add Firebase services by calling availableProjects.list.

    Use this unique identifier (for example, projects/my-project-123) in later calls.

  2. Add Firebase services to the GCP project by calling projects.addFirebase.
    • For this call, you must specify timeZone and regionCode in the request body.
    • To call projects.addFirebase, a member must be an Editor or Owner for the existing GCP Project. Service accounts cannot call projects.addFirebase.

Add Firebase apps to your Firebase project

Add an iOS app

To add an iOS app to your FirebaseProject, call projects.iosApps.create.

For this call, you must specify bundleId in the request body. Specifying displayName is optional, but it can be helpful as this is the app's display name in the Firebase console.

Add an Android app

To add an Android app to your FirebaseProject, call projects.androidApps.create.

For this call, you must specify packageName in the request body. Specifying displayName is optional, but it can be helpful as this is the app's display name in the Firebase console.

  • To add SHA certificates to the Android app, call projects.androidApps.sha.create.

    For this call, you must specify shaHash and certType in the request body.

Add a Web app

To add a Web app to your FirebaseProject, call projects.webApps.create.

For this call, specifying displayName in the request body is optional, but it can be helpful as this is the app's display name in the Firebase console.

Set the default resource location for your Firebase project

If you plan to use Cloud Firestore or Cloud Storage, you can programmatically set your default Google Cloud Platform (GCP) resource location for your FirebaseProject, or you can set this location using the Firebase console (either in your Project Settings or when enabling Cloud Firestore or Cloud Storage.

To set your default GCP resource location programmatically, call projects.defaultLocation.finalize.

  • For this call, you must specify the locationId in the request body.
  • To call projects.defaultLocation.finalize, a member must be an Editor or Owner for the Project.

Service: firebase.googleapis.com

All URIs below are relative to https://firebase.googleapis.com

This service provides the following discovery document:

REST Resource: v1beta1.availableProjects

Methods
list GET /v1beta1/availableProjects
Returns a list of Google Cloud Platform (GCP) Projects that are available to have Firebase resources added to them.

REST Resource: v1beta1.operations

Methods
get GET /v1beta1/{name=operations/**}
Gets the latest state of a long-running operation.

REST Resource: v1beta1.projects

Methods
addFirebase POST /v1beta1/{project=projects/*}:addFirebase
Adds Firebase resources to the specified existing Google Cloud Platform (GCP) Project.
get GET /v1beta1/{name=projects/*}
Gets the FirebaseProject identified by the specified resource name.
getAdminSdkConfig GET /v1beta1/{name=projects/*/adminSdkConfig}
Gets the configuration artifact used by servers to simplify initialization.
list GET /v1beta1/projects
Lists each FirebaseProject accessible to the caller.
patch PATCH /v1beta1/{project.name=projects/*}
Updates the attributes of the FirebaseProject identified by the specified resource name.
searchApps GET /v1beta1/{parent=projects/*}:searchApps
A convenience method that lists all available Apps for the specified FirebaseProject.

REST Resource: v1beta1.projects.androidApps

Methods
create POST /v1beta1/{parent=projects/*}/androidApps
Requests that a new AndroidApp be created.
get GET /v1beta1/{name=projects/*/androidApps/*}
Gets the AndroidApp identified by the specified resource name.
getConfig GET /v1beta1/{name=projects/*/androidApps/*/config}
Gets the configuration artifact associated with the specified AndroidApp.
list GET /v1beta1/{parent=projects/*}/androidApps
Lists each AndroidApp associated with the specified parent Project.
patch PATCH /v1beta1/{app.name=projects/*/androidApps/*}
Updates the attributes of the AndroidApp identified by the specified resource name.

REST Resource: v1beta1.projects.androidApps.sha

Methods
create POST /v1beta1/{parent=projects/*/androidApps/*}/sha
Adds a SHA certificate to the specified AndroidApp.
delete DELETE /v1beta1/{name=projects/*/androidApps/*/sha/*}
Removes a SHA certificate from the specified AndroidApp.
list GET /v1beta1/{parent=projects/*/androidApps/*}/sha
Returns the list of SHA-1 and SHA-256 certificates for the specified AndroidApp.

REST Resource: v1beta1.projects.availableLocations

Methods
list GET /v1beta1/{parent=projects/*}/availableLocations
Returns a list of valid Google Cloud Platform (GCP) resource locations for the specified Project (including a FirebaseProject).

REST Resource: v1beta1.projects.defaultLocation

Methods
finalize POST /v1beta1/{parent=projects/*}/defaultLocation:finalize
Sets the default Google Cloud Platform (GCP) resource location for the specified FirebaseProject.

REST Resource: v1beta1.projects.iosApps

Methods
create POST /v1beta1/{parent=projects/*}/iosApps
Requests that a new IosApp be created.
get GET /v1beta1/{name=projects/*/iosApps/*}
Gets the IosApp identified by the specified resource name.
getConfig GET /v1beta1/{name=projects/*/iosApps/*/config}
Gets the configuration artifact associated with the specified IosApp.
list GET /v1beta1/{parent=projects/*}/iosApps
Lists each IosApp associated with the specified parent Project.
patch PATCH /v1beta1/{app.name=projects/*/iosApps/*}
Updates the attributes of the IosApp identified by the specified resource name.

REST Resource: v1beta1.projects.webApps

Methods
create POST /v1beta1/{parent=projects/*}/webApps
Requests that a new WebApp be created.
get GET /v1beta1/{name=projects/*/webApps/*}
Gets the WebApp identified by the specified resource name.
getConfig GET /v1beta1/{name=projects/*/webApps/*/config}
Gets the configuration artifact associated with the specified WebApp.
list GET /v1beta1/{parent=projects/*}/webApps
Lists each WebApp associated with the specified parent Project.
patch PATCH /v1beta1/{app.name=projects/*/webApps/*}
Updates the attributes of the WebApp identified by the specified resource name.