Are there any good examples of tutorials of the Firestore REST API RunQuery endpoint?

Viewed 486

I've successfully gotten my Vapor app to read and write collections and documents from Firestore, but I now have a use case where a query is required. I've followed the documentation for Firestore Queries and am using them in my iOS client successfully, which utilizes the iOS Firestore library not the REST API, but on the server I've haven't been unable to figure out how to execute the same query. The Firestore documentation seems incomplete in this area.

This API endpoint tool from Google does allow me to submit queries but there appears to be very little documentation on how to format the fields in the request body for the RunQuery endpoint.

https://developers.google.com/apis-explorer/#search/firestore/firestore/v1/firestore.projects.databases.documents.runQuery

Does anyone have experience to share on how to format the request body to create a well formed query to Firestore with the REST API?

FWIW, this Medium post was awesome for getting started with the REST API but stops just short of the richer Firestore requests. https://medium.com/rocket-fuel/getting-started-with-firebase-for-server-side-swift-93c11098702a

1 Answers
Related