# API クイックスタート

## ![](/files/9e2d655145b82643bc287d5140ed27bfd9ca59a6) 概要

このクイックスタートでは、Flosum Cloud Apps API の利用を開始するために必要な基本情報を提供します。すぐに概要をつかみ、自信を持ってリクエストの送信を始められるように設計されています。

### 利用可能な API

現在利用可能な Flosum Cloud Apps の公開 API は次のとおりです。

<table><thead><tr><th width="160">API</th><th>説明</th></tr></thead><tbody><tr><td><a href="/pages/b28361f099a4c3efc74f6e29d60786d3fb821461">グローバル設定</a></td><td>Flosum Cloud Apps テナントへの接続を認証します。</td></tr><tr><td><a href="/pages/9f053e9fbf2fbea8e469e4bfc211e801d58b37cf">バックアップとアーカイブ</a></td><td>バックアップとアーカイブの作成、スケジュール設定、実行、管理を行います。</td></tr></tbody></table>

#### ベース URL

以下の表は、各 API のベース URL を示しています。Flosum のテナントは地域ごとにホストされるため、テナントがホストされている地域のベース URL を使用してください。

<table><thead><tr><th width="160.3333740234375">API</th><th>米国</th><th>ドイツ</th><th>日本</th><th>オーストラリア</th></tr></thead><tbody><tr><td>グローバル設定</td><td>global-us.flosum.app</td><td>global-de.flosum.app</td><td>global-jp.flosum.app</td><td>global-au.flosum.app</td></tr><tr><td>バックアップとアーカイブ</td><td>backup-us.flosum.app</td><td>backup-de.flosum.app</td><td>backup-jp.flosum.app</td><td>backup-au.flosum.app</td></tr></tbody></table>

{% hint style="warning" %}

### 接続と組織

Flosum Cloud Apps API では、テナントに接続された Salesforce 組織は **接続**と呼ばれますが、Flosum Cloud Apps の UI では **組織**と呼ばれます。どちらの用語も同じリソースを表しているため、UI に表示される Organization は API が返す Connection に直接対応します。UI の操作を API のリクエストやレスポンスと照合する際には、この対応関係を念頭に置いてください。
{% endhint %}

## 認証

Flosum Cloud Apps の API は、Global Settings API を通じた OAuth 2.0 認証をサポートしています。以下は、接続を認証するために必要な基本手順です。このプロセスでは、 `authorization_code` フローを使用した OAuth 2.0 認証について既に理解していることを前提としています。

{% stepper %}
{% step %}

### 接続済みアプリを作成する

Flosum Cloud Apps テナントで認証するには、Global Settings に接続済みアプリが必要です。この接続済みアプリは、認証で使用される Client ID と Client Secret の値を提供します。API に接続するための接続済みアプリの作成方法については、次の記事を参照してください。

* [API アクセス用の接続アプリの作成](/global-settings/global-settings-docs-ja/sekyuriti/connected-apps/api-akusesunoapurino.md)
  {% endstep %}

{% step %}

### 認可コードを取得する

**エンドポイント**: [Broken mention](broken://pages/0c65f36af32dede5cba0f02ebd11b7ce97d4455d#get-api-v1-oauth-authorize)

ブラウザーで認可 URL を開き、Global Settings にサインインして、接続済みアプリを承認します。ブラウザーがコールバック URL にリダイレクトしたら、その URL から `code` クエリパラメータをコピーします。
{% endstep %}

{% step %}

### コードをトークンに交換する

**エンドポイント**: [Broken mention](broken://pages/0c65f36af32dede5cba0f02ebd11b7ce97d4455d#post-api-v1-oauth-token)

以下の本文キーを使用してリクエストを送信します。

<table><thead><tr><th width="199.6666259765625">キー</th><th>値</th></tr></thead><tbody><tr><td><code>grant_type</code></td><td><code>authorization_code</code></td></tr><tr><td><code>code</code></td><td>前の手順で取得した <strong>認可コード</strong> です。</td></tr><tr><td><code>redirect_uri</code></td><td>前の手順で使用したのと同じリダイレクト URI です。</td></tr><tr><td><code>client_id</code></td><td>あなたの <code>Client Id</code></td></tr><tr><td><code>client_secret</code></td><td>あなたの <code>Client Secret</code></td></tr></tbody></table>

成功した `200` レスポンスは `access_token` と `refresh_token`を返します。後続の API 呼び出しでは `access_token` を `Authorization: Bearer` ヘッダーに渡し、 `refresh_token` を保存して、現在のアクセス トークンの期限が切れたときに新しいアクセス トークンを取得できるようにします。
{% endstep %}
{% endstepper %}


---

# 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.flosum.com/api/api-ja/api-kuikkusutto.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.
