【问题标题】:Is there a way to write database rules through Firestore's REST API有没有办法通过 Firestore 的 REST API 编写数据库规则
【发布时间】:2019-10-22 12:31:56
【问题描述】:

我想使用脚本初始化 Firestore 数据库,因此我想通过 REST API 而不是手动写入数据库规则。

有一个 REST API 可以编辑 Firebase 实时数据库安全规则。通常还有一个 REST API 可以与 Firestore 交互。但是,我还没有找到用于编辑 Cloud Firestore 数据库安全规则的 REST API。

【问题讨论】:

  • 你的用例是什么?全部覆盖?还是只是一部分?我认为没有 REST API 可以实现这一点,更接近的是使用 cli

标签: firebase google-cloud-firestore firebase-security


【解决方案1】:

最好的方法可能是使用firebase-tools 节点模块,你可能已经知道它是Firebase CLI

通过signing in with login:ci,您可以从 CI 系统中调用各种命令,包括通过running or calling firebase deploy --only firestore:rules 调用deploying your Firestore security rules

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-05-10
    • 2021-08-24
    • 1970-01-01
    • 2021-06-24
    • 2020-05-22
    • 2019-10-15
    • 1970-01-01
    相关资源
    最近更新 更多