Firebase Rules API Stay organized with collections Save and categorize content based on your preferences.
Creates and manages rules that determine when a Firebase Security Rules-enabled service should permit a request.
For a description of the tools you can use to manage your Security Rules, including this REST API, seeManage and deploy Firebase Security Rules.
You can try out calling a Security Rules REST API method on live data using the embedded API Explorer. This API Explorer allows you to see the API request and response without leaving the API's reference documentation.
Find the embedded explorer in the side-panel of each method's reference page (click any method in the tables below).
Overview
Firebase Security Rules is comprised of a language and an API. Developers write rules in the language, publish them via the API, and then submit requests to Firebase Security Rules-enabled services. Services evaluate requests using the provided ruleset and determine whether the requests should be permitted.
The following terms are used in this reference documentation.
Source: Domain-specific language containing rules scoped to aserviceandpathdescribing the conditions when a specificrequestoperationmay be permitted.Ruleset: Persistent immutable copySourcecontent with a generated name.Release: Named reference to aRuleset, which makes theRulesetavailable for consumption and enforcement by Firebase Security Rules-enabled services.
Service: firebaserules.googleapis.com
To call this service, we recommend that you use the Google-providedclient libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.
Discovery document
ADiscovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
Service endpoint
Aservice endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:
https://firebaserules.googleapis.com
REST Resource:v1.projects
| Methods | |
|---|---|
test | POST /v1/{name=projects/**}:testTest Source for syntactic and semantic correctness. |
REST Resource:v1.projects.releases
| Methods | |
|---|---|
create | POST /v1/{name=projects/*}/releasesCreate a Release. |
delete | DELETE /v1/{name=projects/*/releases/**}Delete a Release by resource name. |
get | GET /v1/{name=projects/*/releases/**}Get a Release by name. |
getExecutable | GET /v1/{name=projects/*/releases/**}:getExecutableGet the Release executable to use when enforcing rules. |
list | GET /v1/{name=projects/*}/releasesList the Release values for a project. |
patch | PATCH /v1/{name=projects/*/releases/**}Update a Release via PATCH. |
REST Resource:v1.projects.rulesets
| Methods | |
|---|---|
create | POST /v1/{name=projects/*}/rulesetsCreate a Ruleset fromSource. |
delete | DELETE /v1/{name=projects/*/rulesets/*}Delete a Ruleset by resource name. |
get | GET /v1/{name=projects/*/rulesets/*}Get a Ruleset by name including the fullSource contents. |
list | GET /v1/{name=projects/*}/rulesetsList Ruleset metadata only and optionally filter the results byRuleset name. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-11-11 UTC.