メインコンテンツへスキップ
POST
/
poweredby
/
connection
/
edit
/
{connectionId}
Edit Connection
curl --request POST \
  --url https://cloud.cdata.com/api/poweredby/connection/edit/{connectionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "redirectURL": "https://www.google.com"
}
'
{
  "redirectURL": "https://cloud.cdata.com/oem/user/connections/edit/eeef6211-5d6f-4347-b5bb-f99d574e75e5?driver=MailChimp&token=eyJhbGciOiJSUzI1NiIs...truncated...&redirectUrl=https%3A%2F%2Fwww.google.com"
}
コネクションの編集は、ユーザーをリダイレクトする CData ホストの URL を含む文字列を返します。 コネクションの編集が成功した場合のフローは次のとおりです。
1
コネクションの編集リクエストが成功すると、CData がホストする Edit Connection ページへの URL が生成されます。リクエストボディの redirectURL は、Edit Connection ページの Return to ボタンに対応します。
2
ユーザーが Save & Test をクリックします。内部 API レスポンスには、CData がホストする Edit Connection ページへのコネクション詳細が含まれます。
3
ユーザーが Return to をクリックします。コネクション情報はパラメータとしてリダイレクト URL に追加されます。 パラメータには以下が含まれます。
  • cdata_connection_id – コネクションの一意の ID。
  • cdata_connection_nameSalesforce1 などのコネクション名。
  • cdata_connection_status – コネクションのステータス。値は successerror(接続エラー)、または none(接続が行われなかった)です。
例 1: Save & Test が成功した後の URL:
https://www.google.com/?cdata_connection_id=da77460c-7438-4288-be66-ea0059c160ae&cdata_connection_name=OData1&cdata_connection_status=success&zx=1773244250880&no_sw_cr=1
例 2: ユーザーが Return to をクリックし、Save & Test を実行しなかった場合の URL:
https://www.google.com/?cdata_connection_status=none&zx=1773252769892&no_sw_cr=1
例 3: 保存後にテストが失敗した場合の URL:
https://www.google.com/?cdata_connection_id=507b42e8-94b1-488e-a1d8-5a62d5d74a31&cdata_connection_name=Salesforce1&cdata_connection_status=error&zx=1773252951878&no_sw_cr=1

承認

Authorization
string
header
必須

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

パスパラメータ

connectionId
string
必須

The connection Id created in Create Connection.

ボディ

application/json
redirectURL
string
必須

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

name
string | null

(Optional) If provided, the connection name. By default, this is a suggested default that the end user can change on the Edit Connection form. Set editableName to false to lock the field and enforce the supplied value server-side.

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.