Firebase是否支持REST API中的批处理操作?

时间:2014-10-23 01:36:22

标签: rest firebase

使用Firebase时,我需要批量 DELETE POST 操作。
它是否支持REST API中的批处理操作

1 个答案:

答案 0 :(得分:5)

Firebase中最简单的“批处理”操作是在树中向上移动一级,然后执行PATCH或DELETE操作。

考虑以下数据结构:

/foo/bar
/foo/baz
/foo/bap
/foo/bam

如果我想删除barbaz,我可以执行以下操作:

curl -X PATCH https://<instance>.firebaseio.com/<PATH>.json -d '{"bar": null, "baz": null}'