Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the database id of a cloud firestore project?

I'm trying to use the Cloud Firestore REST API, but can't seem to find the project id.

like image 485
Alex Mason Avatar asked Feb 02 '18 14:02

Alex Mason


People also ask

How do I find my firestore database ID?

To query Firestore database for document ID with JavaScript, we call the doc method. Then we call doc to get the entry from the books collection with ID 'fK3ddutEpD2qQqRMXNW5' . Finally, we call get to return the object with the given ID.

How do I find database URL in firestore database?

You can find your Realtime Database URL in the Realtime Database section of the Firebase console. Depending on the location of the database, the database URL will be in one of the following forms: https:// DATABASE_NAME . firebaseio.com (for databases in us-central1 )

Is firestore document ID unique?

Correct, it is extremely unlikely, but not guaranteed.

How do I get the document ID added to firestore?

location. href = `https://mypage.com/${id}` . Notice that around the url are not ' or " , but backticks which make it possible to use this method. The alternative would be to create a new string with the id, similar to this: const newUrl = "https://mypage.com" + id , then window.


1 Answers

Firestore's REST API is still in beta; we can't generate our own database ids as of yet.

We have to use the default database id which is currently the following (glaringly literal) string:

(default)

And yes, you have to include the parentheses.

like image 128
TheAddonDepot Avatar answered Oct 14 '22 10:10

TheAddonDepot