Managing Firestore with the console

You can manage Firestore through the following actions in the Google Cloud Console:

  • View, add, edit, and delete data.
  • Manage indexes.

View data

You can view all your Firestore data in the Google Cloud Console. From the Firestore data viewer, click on a document or collection to open the data nested within that item.

Go to the Firestore Data page

Open a specific path

To open a document or collection at a specific path, use the Edit path button create:

Non-existent ancestor documents

A document can exist even if one or more its ancestors don't exist. For example, the document at path /mycoll/mydoc/mysubcoll/mysubdoc can exist even if the ancestor document /mycoll/mydoc does not. The Firestore data viewer displays non-existent ancestor documents as follows:

  • In a collection's list of documents, the document IDs of non-existent ancestor documents are italicized.
  • In a non-existent ancestor document's information panel, the data viewer points out that the document does not exist.

Filter data

You can filter documents in a collection based on field value and the ==, >, >=, <, <=, in, array-contains, array-contains-any conditions. For example, you can display only documents where the value of field firstname equals Sam. To apply a collection filter:

  1. Click the filter button filter_list next to a collection ID:

  2. From the Add filters menu, select a document field, a filter condition, and a sort order.

  3. Click Apply.

To remove a collection filter, open the same menu and click Clear filter.

Manage data

In Firestore, you store data in documents and organize your documents into collections. Before you start adding data, learn more about the Firestore data model.

You can add, edit, and delete documents and collections from the Firebase console. To manage your data from the GCP console, go to the Firestore Data page:

Go to the Firestore Data page

Add data

  1. Click Start Collection.
  2. Enter a collection ID. Enter a document ID. Firestore will generate document ID, but you can overwrite for a specific document ID. Add fields for the data in your document.
  3. Click Save. Your new collection and document appear in the data viewer.
  4. To add more documents to the collection, click Add Document.

Edit data

  1. Click on a collection to view its documents, then click on a document to view its fields and subcollections.
  2. Click on a field to edit its value. To add fields or subcollections to the selected document, click Add Field or Start Collection.

Delete data

To delete a collection:

  1. Select the collection you want to delete.
  2. Click the menu icon at the top of the documents column, then click Delete collection.

Click Delete collection from the menu in the documents column

To delete a document:

  1. Select the document you want to delete.
  2. Click the menu icon at the top of the document details column. Select Delete document or Delete document fields.

Deleting a document deletes all of the nested data in that document, including any subcollections.

Deleting a document's fields does not delete its subcollections. Although empty, the document still exists and can appear in query results.

Click Delete document or Delete document fields from the context menu in the document details column

To delete a specific field in a document:

  1. Select the document to view its fields.
  2. Click the delete icon beside the field you want to delete.

Click the delete icon to remove a field from a document

Manage Firestore Security Rules

To add, edit, and delete Firestore Security Rules, you must use the Firebase console. Go to the Rules tab in the Database section. Learn more about setting up and customizing rules.

Manage indexes

To create new indexes for your queries and manage existing indexes from the Firebase console, go to the Indexes tab in the Database section. Learn more about managing indexes.