ベース接続は、ソースと Adobe Experience Platform 間の認証済み接続を表します。
このチュートリアルでは、Flow Service API を使用して、HubSpot のベース接続を作成する手順を説明します。
このガイドでは、Adobe Experience Platform の次のコンポーネントに関する十分な知識が必要です。
The following sections provide additional information that you will need to know in order to successfully connect to HubSpot using the Flow Service API.
次のために Flow Service ~とつながる HubSpotに値を入力する場合は、次の接続プロパティを指定する必要があります。
認証情報 | 説明 |
---|---|
clientId |
The client ID associated with your HubSpot application. |
clientSecret |
に関連付けられたクライアント秘密鍵 HubSpot アプリケーション。 |
accessToken |
OAuth 統合を最初に認証したときに取得されたアクセストークン。 |
refreshToken |
The refresh token obtained when initially authenticating your OAuth integration. |
connectionSpec.id |
接続仕様は、ベース接続とソース接続の作成に関連する認証仕様を含む、ソースのコネクタプロパティを返します。HubSpot の接続仕様 ID は cc6a4487-9e91-433e-a3a3-9cf6626c1806 です。 |
導入の詳細については、 HubSpot ドキュメント.
Platform API への呼び出しを正常に実行する方法について詳しくは、Platform API の概要を参照してください。
ベース接続は、ソースと Platform 間の情報(ソースの認証資格情報、現在の接続状態、固有のベース接続 ID など)を保持します。ベース接続 ID により、ソース内からファイルを参照および移動し、データタイプやフォーマットに関する情報を含む、取り込みたい特定の項目を識別することができます。
ベース接続 ID を作成するには、/connections
エンドポイントに POST リクエストを実行し、HubSpot 認証資格情報をリクエストパラメーターの一部として使用します。
API 形式
POST /connections
リクエスト
次のリクエストは、HubSpot のベース接続を作成します。
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/connections' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "connection for HubSpot",
"description": "connection for HubSpot",
"auth": {
"specName": "Basic Authentication",
"params": {
"clientId": "{CLIENT_ID}",
"clientSecret": "{CLIENT_SECRET}",
"accessToken": "{ACCESS_TOKEN}",
"refreshToken": "{REFRESH_TOKEN}"
}
},
"connectionSpec": {
"id": "cc6a4487-9e91-433e-a3a3-9cf6626c1806",
"version": "1.0"
}
}
プロパティ | 説明 |
---|---|
auth.params.clientId |
次に関連付けられたクライアント ID: HubSpot アプリケーション。 |
auth.params.clientSecret |
に関連付けられたクライアント秘密鍵 HubSpot アプリケーション。 |
auth.params.accessToken |
OAuth 統合を最初に認証したときに取得されたアクセストークン。 |
auth.params.refreshToken |
The refresh token obtained when initially authenticating your OAuth integration. |
connectionSpec.id |
この HubSpot 接続仕様 ID: cc6a4487-9e91-433e-a3a3-9cf6626c1806 . |
応答
A successful response returns the newly created connection, including its unique connection identifier (id
). This ID is required to explore your data in the next tutorial.
{
"id": "2fce94c1-9a93-4971-8e94-c19a93097129",
"etag": "\"d403848a-0000-0200-0000-5e978f7b0000\""
}
このチュートリアルに従って、 HubSpot を使用したベース接続 Flow Service API You can use this base connection ID in the following tutorials: