メインコンテンツへスキップ
POST
Create Connection
コネクションの作成は、Connect AI Embed 製品からコネクション作成フローをリクエストします。コネクションの作成はJWT を検証し、ユーザーをリダイレクトするURL を含む文字列を返します。パラメータ dataSource を指定した場合、URL はそのデータソースのAdd Connection ページにユーザーをリダイレクトします。dataSource を省略した場合、URL はコネクション一覧から追加するコネクションをユーザーが選択できる汎用のAdd Connection ページにリダイレクトします。 コネクションの作成が成功した場合のフローは次のとおりです。
1
コネクションの作成リクエストが成功すると、CData がホストするAdd Connection ページへのURL が生成されます。リクエストボディの redirectURL は、Add Connection ページのReturn to ボタンに対応します。
2
ユーザーがSave & Test をクリックします。内部API レスポンスには、CData がホストするAdd Connection ページへのコネクション詳細が含まれます。
3
ユーザーがReturn to をクリックします。コネクション情報はパラメータとしてリダイレクトURL に追加されます。パラメータには以下が含まれます。
  • cdata_connection_id – コネクションの一意のID。
  • cdata_connection_name – Salesforce1 などのコネクション名。
  • cdata_connection_status – コネクションのステータス。値は success、error(接続エラー)、または none(接続が行われなかった)です。
例 1: Save & Test が成功した後のURL:
例 2: ユーザーがReturn to をクリックし、Save & Test を実行しなかった場合のURL:
例 3: 保存後にテストが失敗した場合のURL:

承認

Authorization
string
header
必須

JWT token authentication. Include the token in the Authorization header as Bearer {token}. See Authentication for more information on creating a token.

ボディ

application/json
redirectURL
string
必須

The URL to redirect the customer once the customer has created the connection through the Connect AI UI. This URL maps to the Return to button on the Add Connection page in the Connect AI UI.

dataSource
string | null

(Optional) The type of data source (For example: Snowflake, ActOn, or Salesforce). You can obtain data source names from List Connections. If you omit this parameter, the user can select from a list of available data sources.

name
string | null

(Optional) If provided, the connection name. By default, this is a suggested default that the end user can change on the Add Connection form. Set editableName to false to lock the field to this value. If name is provided without a dataSource, it is ignored.

externalId
string | null

(Optional) Your identifier for this connection in your own system. Must be unique within the sub-account; if a connection with the same externalId already exists under the account, the request returns a conflict error.

editableName
boolean
デフォルト:true

(Optional) The default value is true. When true, any name you supply is shown as a suggested default value, and the end user can change it. When false, the Connection Name field is rendered read-only, and the server enforces the supplied name on submit. Has no effect when name is omitted.

レスポンス

200 - application/json

A string containing the CData-hosted connection URL to redirect the user to.

redirectURL
string
必須

A string containing the CData-hosted connection URL to redirect the user to.

最終更新日 2026年10月28日