Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion website/docs/connect-data/reference/querying-firestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ The following section is a reference guide that provides a complete description

<dd>

The domain or network location of your database instance. This value includes your **Project ID** in the format
Optional. The Firebase Realtime Database URL of your project, in the format:

```
https://PROJECT_ID.firebaseio.com
```

Appsmith doesn't use this value to connect to Firestore, and it doesn't select which Firestore database your queries run against. To query a named Firestore database, use [Database ID](#database-id).

</dd>

#### Project ID
Expand All @@ -33,6 +35,23 @@ The unique identifier for your Firestore project, accessible in your Firebase pr

</dd>

#### Database ID

<dd>

Optional. The ID of the Firestore database to query. Leave it empty to use the project's `(default)` database. If your project has more than one Firestore database, enter the ID of the named database here. For more information, see [Manage databases](https://firebase.google.com/docs/firestore/manage-databases).

A database ID must:

- Be 4 to 63 characters long.
- Contain only lowercase letters, numbers, and hyphens.
- Start with a letter and end with a letter or number.
- Not be shaped like a UUID.

If the ID doesn't meet these rules, Appsmith shows an **Invalid Database ID** error. If the database doesn't exist in the project, **Test configuration** fails with a message asking you to check the Database ID and Project ID.

</dd>

#### Service account credentials

<dd>
Expand All @@ -48,6 +67,14 @@ Service account credentials are used to authenticate your queries to Firestore.

</dd>

:::note
If you change **Database URL**, **Project ID**, or **Database ID** on a saved datasource, enter the **Service account credentials** again before you test or save it. Otherwise, Appsmith shows the error "The datasource connection settings changed. Re-enter the credentials and try again."
:::

:::caution
**Database ID** isn't carried over when you export an app, connect it to Git, or fork it without its datasource configuration. After you reconnect the datasource, enter the **Database ID** again. Until you do, queries run against the `(default)` database.
:::

## Create queries

The following section is a reference guide that provides a complete description of all the read and write operation commands with their parameters to create Firestore queries.
Expand Down
Binary file modified website/static/img/firestore-datasource-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading