# Firebase連携したい

DashcombがサポートしているNoSQLデータベースのFirebaseを利用して、新しい[Data Source](https://github.com/dashcomb/gitbook-doc/blob/master/tips-and-tricks/broken-reference/README.md)として追加することができます。

また、画面の新しいAPIとして、Firebaseでデータ連携をすることもできます。

## 準備

* データソースリストにこれから使うFirestoreの接続を追加しておきます。
* このFirestoreの連携先になる管理画面を作成しておきます。

## 実現

* [クエリ領域](/dashcomb-help-center/ide/query-region.md)で「API」タブをクリックします。
* 「+」アイコンを押して、API名を作成します。
* データソースリストから対象のFirestore APIを選びます。
* 「実行前アクション」に「アクション無し」、「確認」、「承認」を選べることができます。
  * ここでは初期の「アクション無し」を選びます。
* 「アクション」に「検索」、「取得」、「挿入」、「更新」、「削除」を選びます。
* `{{}}` を使って管理画面要素の値を取得し、「パス」や「JSON」の項目に引数として埋め込みます。
  * （例）`{{input1.value}}`
* 「アクション」に「コレクション検索」を選ぶ場合、「リミット」、「Where条件」、「Where - Array contains any (10個まで)」、「並び替え」も設定する必要があります。
* 「成功時」、「失敗時」の「アクション」や「通知」を設定します。
  * 設定方法の詳細は[アクションエディタ](/dashcomb-help-center/ide/property-region/action-editor.md)にご参考ください。
  * ここでは全て初期の「アクション無し」を選びます。
* 「実行」ボタンをクリックして、「成功しました」の「結果」を確認します。
* 「保存」ボタンを押すと、Firebaseとの連携ができました。

## 参照項目

* [API](/dashcomb-help-center/ide/others/dtassu/api.md)
* [API経由のCRUD操作](/dashcomb-help-center/tips-and-tricks/api-crud.md)
* [アクションエディタ](/dashcomb-help-center/ide/property-region/action-editor.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dashcomb.com/dashcomb-help-center/tips-and-tricks/connect-with-firebase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
