I was trying to use the GCP filestore, following the simple quick example in the product website and get an error: "google.api_core.exceptions.FailedPrecondition: 400 The Cloud Firestore API is not available for Cloud Datastore projects."
I did use the datastore before in the same project, I then disabled the datastore api in the project and try out the example, still get the same error any one can suggest what to do other than creating a new project ?
I had The Cloud Firestore API is not available for Datastore Mode projects with an empty Firestore. Open Firestore in your web browser. Create at least one collection. Sadly, Google error messages are useless, as you see by this example.
Datastore mode disables Firestore features that are not compatible with Datastore: The project will accept Datastore API requests and deny Firestore API requests. The project will use Datastore indexes instead of Firestore indexes.
Interact with this API in your browser using the APIs Explorer for the Cloud Firestore API. Install the NuGet package: Google.Apis.Firestore.v1. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.
When a Cloud Firestore request succeeds, the Cloud Firestore API returns an HTTP 200 OK status code and the requested data. When a request fails, the Cloud Firestore API returns an HTTP 4xx or 5xx status code and a response with information about the error.
If you have an empty Cloud Datastore database and you never executed a write to the database, you can upgrade to Cloud Firestore in Datastore mode or Native mode, by clicking the ‘’UPGRADE TO FIRESTORE’ button on the ‘Datastore/Entities’ page.
If you do not receive the option, then your database instance will be automatically upgraded at a future date(link). If you upgrade from Cloud Datastore to Cloud Firestore in Datastore mode or from Datastore mode to Native mode, you cannot undo the operation.
Here is the link to the Doc: https://cloud.google.com/datastore/docs/upgrade-to-firestore
I had The Cloud Firestore API is not available for Datastore Mode projects
with an empty Firestore.
I've solved the error with the steps:
Sadly, Google error messages are useless, as you see by this example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With