連携

Integrations のドキュメント

Integrations

ベースパス: /api/v1/integrations

連携は接続済みのサードパーティサービス(OAuth2 ベース)を表します。ユーザーはアカウントを接続し、プラットフォームがアクセストークンを管理します。各連携にはワークフローが使用できるアクション(特定の操作)があります。


エンドポイント概要

MethodPathAuthDescription
GET/api/v1/integrations/meJWTユーザーの接続済み連携とアクションを取得
PATCH/api/v1/integrations/accounts/:accountId/sharingJWTアカウントのチーム共有を更新
DELETE/api/v1/integrations/:integrationSlug/actions/:actionNameJWT連携アクションを切断

GET /api/v1/integrations/me

認証済みユーザーの接続済み OAuth2 アカウントと利用可能なアクションを返します。

認証

JWT が必要です。x-active-org ヘッダーで組織コンテキストを決定します。

レスポンス 200 OK

json

レスポンスフィールド:

FieldTypeDescription
integrationsarray接続済みアカウントの一覧
userActionsarray接続済み連携全体で利用可能なアクションの一覧

連携(接続済みアカウント)フィールド:

FieldTypeDescription
accountIdentifierstringアカウント識別子(例: メールアドレス)
integrationSlugstring連携 slug(例: "google-workspace""slack"
baseUrlstring | nullカスタムベース URL(セルフホストサービス向け)
sharedTeamKeysstring[]この接続アカウントを共有しているチーム

ユーザーアクションフィールド:

FieldTypeDescription
action.namestringアクション slug(例: "send-email"
action.displayNamestring人間が読めるアクション名
action.descriptionstringアクションの説明
action.documentationstring[]ドキュメントリンク
action.notesstring追加メモ
group.namestring連携 slug
group.displayNamestring連携の表示名
group.descriptionstring連携の説明
group.notesstring追加メモ

PATCH /api/v1/integrations/accounts/:accountId/sharing

接続済み OAuth2 アカウントのチーム共有設定を更新します。現在の共有リストを置き換えます(マージではありません)。

認証

JWT が必要です。

パスパラメータ

ParameterTypeDescription
accountIdstring (UUID)接続済みアカウント ID

リクエストボディ(JSON)

FieldTypeRequiredDefaultDescription
shareWithTeamKeysstring[]Yes[]共有するチームキー。[] で全共有を取り消し。
json

レスポンス 200 OK

json

DELETE /api/v1/integrations/:integrationSlug/actions/:actionName

特定のアクション(またはすべてのアクション)を連携から切断します。該当アクションスコープの保存済み OAuth2 トークンを失効させます。

認証

JWT が必要です。

パスパラメータ

ParameterTypeDescription
integrationSlugstring連携 slug(例: "google-workspace"
actionNamestring切断するアクション名、またはこの連携の全アクション切断時は "all"

レスポンス 200 OK

特定アクションを切断する場合:

json

全アクションを切断する場合(actionName = "all"):

json
FieldTypeDescription
successboolean成功時は常に true
messagestringステータスメッセージ
countnumber切断したアクション数("all" の場合のみ)

連携 Slug

連携 slug は ^[a-z0-9_-]+$ パターンに一致する kebab-case 識別子です。例:

  • google-workspace
  • slack
  • github
  • salesforce
  • microsoft-365

利用可能な連携は連携サービスの設定ファイルで定義されています。

ja/api-docs/integrations