> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/api/api-ja/api-kuikkusutto.md).

# API クイックスタート

## ![](https://4255583558-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdz9Cihd3zGR3GRMtHbln%2Fuploads%2FzF6cQYa8rI5A4rXQeQC1%2FSummary2-Small-Icon.svg?alt=media\&token=b76f02b3-0c59-41c6-8cb7-9c9a6936e554) 概要

このクイックスタートでは、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="/api/api-ja/devops-api/commits.md">DevOps</a></td><td>DevOpsを通じてブランチを作成、コミット、マージ、デプロイします。</td></tr><tr><td><a href="/api/api-ja/bakkuappukaibu-api/backups-and-archives.md">バックアップとアーカイブ</a></td><td>バックアップとアーカイブを作成、スケジュール設定、実行、管理します。</td></tr><tr><td><a href="/api/api-ja/gurbaru-api/oauth.md">グローバル設定</a></td><td>Flosum Cloud Appsテナントへの接続を認証します。</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>DevOps</td><td>devops-us.flosum.app</td><td>devops-de.flosum.app</td><td>devops-jp.flosum.app</td><td>devops-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><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></tbody></table>

{% hint style="warning" %}

### ConnectionsとOrganizations

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

## 認証

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

{% stepper %}
{% step %}

### Connected Appの作成

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

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

{% step %}

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

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

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

{% step %}

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

**エンドポイント**: [Broken mention](broken://pages/537d3f0c90dfa96194df5b0e0f1f46082c6e7e77#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`を返します。 `access_token` を `Authorization: Bearer` 後続のAPI呼び出しのヘッダーに設定し、 `refresh_token` 現在のものが期限切れになったときに新しいアクセストークンを取得できるように、保存してください。
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/api/api-ja/api-kuikkusutto.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
