Does Firebase support batch operations in REST API

2019-02-25 12:54发布

I need batch DELETE, POST operations when using Firebase.
Does it support batch operations in REST API?

标签: rest firebase
1条回答
家丑人穷心不美
2楼-- · 2019-02-25 13:22

The simplest "batch" operation in Firebase would be to move up one level in the tree and either do a PATCH or DELETE op.

Consider the following data structure:

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

If I want to remove bar and baz, I could do the following:

curl -X PATCH https://<instance>.firebaseio.com/<PATH>.json -d '{"bar": null, "baz": null}'
查看更多
登录 后发表回答