# API と接続する

DashcombがサポートしているAPIを利用して、新しい[Data Source](/dashcomb-help-center/ide/others/dtassu.md)としてAPI接続を作成することができます。

現在、DashcombはREST API, Firestore, Firebase Remote Config の三種類のAPIをサポートしています。

***

## REST APIへの接続設定

REST APIとはリプレゼンテーショナル・ステイト・トランスファーで、具体的に状態を定義した情報のやり取りのAPIです。

<figure><img src="/files/LgZyUx0wmw99ZOmgTzPD" alt=""><figcaption></figcaption></figure>

### 準備

* Dashcomb以外のところでREST APIを用意します。

### 実現

* [Data Source接続の設定](/dashcomb-help-center/ide/others/dtassu.md)ページで「新規登録」ボタンをクリックします。
* 「REST API」を選びます。
* 「データソース名」を入力します。（ステージングとプロダクションが共有）
* 「環境」は「ステージング」か「プロダクション」を選びます。
* 接続先APIの「エンドポイント」を入力します。
  * （例）`https://httpbin.org`
* 接続先API「パラメータ」の「キー」と「値」を入力します。
  * 「＋」アイコンを押して「パラメータ」を追加することもできます。
* 接続先API「HTTPヘッダー」の「キー」と「値」を入力します。
  * 「＋」アイコンを押して「HTTPヘッダー」を追加することもできます。
* 接続先API「クッキー」の「キー」と「値」を入力します。
  * 「＋」アイコンを押して「クッキー」を追加することもできます。
* 「接続テスト」ボタンをクリックして、「成功しました」の結果を確認します。
* 「保存」ボタンを押すと、REST APIへの接続が作成できます。

### 参照項目

* [API経由のCRUD操作](/dashcomb-help-center/tips-and-tricks/api-crud.md)
* [APIの認証情報設定](/dashcomb-help-center/tips-and-tricks/set-auth-in-api-request.md)

***

## Firebaseへの接続設定 <a href="#firebase" id="firebase"></a>

FirebaseとはNoSQLデータベースで、迅速に開発できるGoogleのモバイルプラットフォームです。

<figure><img src="/files/8JnTeSPkTkGALLIXkP1o" alt=""><figcaption></figcaption></figure>

### 準備

* Dashcomb以外のところでFirebaseのモバイルアプリ開発用のFirestoreデータベースを作成しておきます。

### 実現

* [データソース](/dashcomb-help-center/ide/others/dtassu.md)の接続設定ページで「新規登録」ボタンをクリックします。
* 「Firestore」を選びます。
* 「データソース名」を入力します。（ステージングとプロダクションが共有）
* 「環境」は「ステージング」か「プロダクション」を選びます。
* 接続先Firestoreの「サービスアカウントJSON」を入力します。
* 「接続テスト」ボタンをクリックして、「成功しました」の結果を確認します。
* 「保存」ボタンを押すと、Firestoreへの接続が作成できます。

***

## Remote Configへの接続設定

<figure><img src="/files/NmXDOkbUHxeBYsdGy9Ao" alt=""><figcaption></figcaption></figure>

### 準備

* Dashcomb以外のところでRemote Configを用意します。

### 実現

* [データソース](/dashcomb-help-center/ide/others/dtassu.md)の接続設定ページで「新規登録」ボタンをクリックします。
* 「Remote Config」を選びます
* 「データソース名」を入力します。（ステージングとプロダクションが共有）
* 「環境」は「ステージング」か「プロダクション」を選びます。
* 接続先Remote Configの「サービスアカウントJSON」を入力します。
* 「接続テスト」ボタンをクリックして、「成功しました」の結果を確認します。
* 「保存」ボタンを押すと、Remote Configへの接続が作成できます。

### 参照項目

* [API経由のCRUD操作](/dashcomb-help-center/tips-and-tricks/api-crud.md)
* [Firebase連携したい](https://github.com/dashcomb/gitbook-doc/blob/master/tips-and-tricks/connect-with-firebase.md.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/ide/others/dtassu/api.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.
