'Firestore: request for a list of collection IDs

[Firestore documentation says:][1]

###Queries other than document reads For queries other than document reads, such as a request for a list of collection IDs, you are billed for one document read. If fetching the complete set of results requires more than one request (for example, if you are using pagination), you are billed once per request.

I cannot find any information of how to perform such queries to get only IDs.

Does anyone know how? [1]: https://firebase.google.com/docs/firestore/pricing#operations



Solution 1:[1]

You can get the collection IDs using the REST API. The documentation is here

You can also return an array of collection IDs with documentRef.getCollections() as detailed here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1