Matt Matt - 2 months ago 16x
reST (reStructuredText) Question

Get multiple child nodes in Firebase with REST API

I have following database hierarchy in my Firebase application.

enter image description here

I know about query parameters in REST API, but how can I get group1 and group2 by single http request?


The only way to get multiple nodes in a REST request is by having a query that matches the nodes you are looking for. Since Firebase Database queries don't have a WHERE key IN (a,b,c) type operation, the query will have to match some property value/range.

In your specific example you could order by key and limit to the first 2 results:


But in general if you want to retrieve a set of N children through the Firebase API, it will require N calls.