Create Connection
curl --request POST \
--url https://cloud.cdata.com/api/poweredby/connection/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataSource": "ExcelOnline",
"redirectURL": "https://www.google.com",
"name": "ExcelConnection",
"externalId": "acme-excel-001"
}
'import requests
url = "https://cloud.cdata.com/api/poweredby/connection/create"
payload = {
"dataSource": "ExcelOnline",
"redirectURL": "https://www.google.com",
"name": "ExcelConnection",
"externalId": "acme-excel-001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataSource: 'ExcelOnline',
redirectURL: 'https://www.google.com',
name: 'ExcelConnection',
externalId: 'acme-excel-001'
})
};
fetch('https://cloud.cdata.com/api/poweredby/connection/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.cdata.com/api/poweredby/connection/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataSource' => 'ExcelOnline',
'redirectURL' => 'https://www.google.com',
'name' => 'ExcelConnection',
'externalId' => 'acme-excel-001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.cdata.com/api/poweredby/connection/create"
payload := strings.NewReader("{\n \"dataSource\": \"ExcelOnline\",\n \"redirectURL\": \"https://www.google.com\",\n \"name\": \"ExcelConnection\",\n \"externalId\": \"acme-excel-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.cdata.com/api/poweredby/connection/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataSource\": \"ExcelOnline\",\n \"redirectURL\": \"https://www.google.com\",\n \"name\": \"ExcelConnection\",\n \"externalId\": \"acme-excel-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/poweredby/connection/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataSource\": \"ExcelOnline\",\n \"redirectURL\": \"https://www.google.com\",\n \"name\": \"ExcelConnection\",\n \"externalId\": \"acme-excel-001\"\n}"
response = http.request(request)
puts response.read_body{
"redirectURL": "https://cloud.cdata.com/oem/user/connections/edit?token=eyJhbGciOiJSUzI1NiIs...truncated...&driver=ExcelOnline&redirectUrl=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttps%2Fwww.google.com"
}コネクションの作成
コネクションの作成はJWT を検証し、ユーザーをリダイレクトするURL を含む文字列を返します。
POST
/
poweredby
/
connection
/
create
Create Connection
curl --request POST \
--url https://cloud.cdata.com/api/poweredby/connection/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataSource": "ExcelOnline",
"redirectURL": "https://www.google.com",
"name": "ExcelConnection",
"externalId": "acme-excel-001"
}
'import requests
url = "https://cloud.cdata.com/api/poweredby/connection/create"
payload = {
"dataSource": "ExcelOnline",
"redirectURL": "https://www.google.com",
"name": "ExcelConnection",
"externalId": "acme-excel-001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataSource: 'ExcelOnline',
redirectURL: 'https://www.google.com',
name: 'ExcelConnection',
externalId: 'acme-excel-001'
})
};
fetch('https://cloud.cdata.com/api/poweredby/connection/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.cdata.com/api/poweredby/connection/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataSource' => 'ExcelOnline',
'redirectURL' => 'https://www.google.com',
'name' => 'ExcelConnection',
'externalId' => 'acme-excel-001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.cdata.com/api/poweredby/connection/create"
payload := strings.NewReader("{\n \"dataSource\": \"ExcelOnline\",\n \"redirectURL\": \"https://www.google.com\",\n \"name\": \"ExcelConnection\",\n \"externalId\": \"acme-excel-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.cdata.com/api/poweredby/connection/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataSource\": \"ExcelOnline\",\n \"redirectURL\": \"https://www.google.com\",\n \"name\": \"ExcelConnection\",\n \"externalId\": \"acme-excel-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.cdata.com/api/poweredby/connection/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataSource\": \"ExcelOnline\",\n \"redirectURL\": \"https://www.google.com\",\n \"name\": \"ExcelConnection\",\n \"externalId\": \"acme-excel-001\"\n}"
response = http.request(request)
puts response.read_body{
"redirectURL": "https://cloud.cdata.com/oem/user/connections/edit?token=eyJhbGciOiJSUzI1NiIs...truncated...&driver=ExcelOnline&redirectUrl=https%3A%2F%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttps%2Fwww.google.com"
}コネクションの作成は、Connect AI Embed 製品からコネクション作成フローをリクエストします。コネクションの作成はJWT を検証し、ユーザーをリダイレクトするURL を含む文字列を返します。パラメータ
例 1: Save & Test が成功した後のURL:
例 2: ユーザーがReturn to をクリックし、Save & Test を実行しなかった場合のURL:
例 3: 保存後にテストが失敗した場合の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(接続が行われなかった)です。
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
https://www.google.com/?cdata_connection_status=none&zx=1773252769892&no_sw_cr=1
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
承認
JWT token authentication. Include the token in the Authorization header as Bearer {token}. See Authentication for more information on creating a token.
ボディ
application/json
(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.
最終更新日 2026年10月28日
このページは役に立ちましたか?