Flow Service は、Adobe Experience Platform内のさまざまな異なるソースから顧客データを収集し、一元化するために使用されます。 このサービスは、ユーザーインターフェイスとRESTful APIを提供し、サポートされるすべてのソースを接続できます。
このチュートリアルでは、 Flow Service APIを使用して顧客成功(CS)システムを調べます。
このガイドでは、Adobe Experience Platform の次のコンポーネントに関する作業を理解している必要があります。
The following sections provide additional information that you will need to know in order to successfully connect to a CS system using the Flow Service API.
APIを使用してCSシステムを調査するには、有効なベース接続IDが必要 Platform です。 操作するCSシステムの基本接続がまだない場合は、次のチュートリアルを使用して作成できます。
このチュートリアルでは、API 呼び出しの例を提供し、リクエストの形式を設定する方法を示します。この中には、パス、必須ヘッダー、適切な形式のリクエストペイロードが含まれます。また、API レスポンスで返されるサンプル JSON も示されています。ドキュメントで使用される API 呼び出し例の表記について詳しくは、 トラブルシューテングガイドのAPI 呼び出し例の読み方に関する節を参照してください。Experience Platform
In order to make calls to Platform APIs, you must first complete the authentication tutorial. Completing the authentication tutorial provides the values for each of the required headers in all Experience Platform API calls, as shown below:
{ACCESS_TOKEN}
{API_KEY}
{IMS_ORG}
All resources in Experience Platform, including those belonging to Flow Service, are isolated to specific virtual sandboxes. All requests to Platform APIs require a header that specifies the name of the sandbox the operation will take place in:
{SANDBOX_NAME}
ペイロード(POST、PUT、PATCH)を含むすべてのリクエストには、メディアのタイプを指定する以下のような追加ヘッダーが必要です。
application/json
CSシステムのベース接続を使用して、GETリクエストを実行することで、データテーブルを調べることができます。 次の呼び出しを使用して、検査または取り込むテーブルのパスを探し Platformます。
API 形式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
パラメーター | 説明 |
---|---|
{BASE_CONNECTION_ID} |
CSベース接続のID。 |
リクエスト
curl -X GET \
'http://platform.adobe.io/data/foundation/flowservice/connections/60a5c8b9-3c30-43ba-a5c8-b93c3093ba66/explore?objectType=root' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
応答
正常に応答すると、CSシステムから一連のテーブルが返されます。 次の手順で、に取り込む表を探し Platform 、 path
プロパティをメモしておきます。このプロパティは、次の手順で指定して構造を検査する必要があります。
[
{
"type": "table",
"name": "Accepted Event Relation",
"path": "AcceptedEventRelation",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Account",
"path": "Account",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Account Change Event",
"path": "AccountChangeEvent",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Account Clean Info",
"path": "AccountCleanInfo",
"canPreview": true,
"canFetchSchema": true
}
]
CSシステムからテーブルの構造を検査するには、テーブルのパスをクエリパラメーターとして指定しながらGETリクエストを実行します。
API 形式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
パラメーター | 説明 |
---|---|
{BASE_CONNECTION_ID} |
CSベース接続のID。 |
{TABLE_PATH} |
テーブルのパス。 |
curl -X GET \
'http://platform.adobe.io/data/foundation/flowservice/connections/60a5c8b9-3c30-43ba-a5c8-b93c3093ba66/explore?objectType=table&object=test1.Mytable' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
応答
正常な応答は、指定されたテーブルの構造を返します。 各テーブルの列に関する詳細は、 columns
配列の要素内にあります。
{
"format": "flat",
"schema": {
"columns": [
{
"name": "Id",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Name",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Phone",
"type": "string",
"xdm": {
"type": "string"
}
},
]
}
}
このチュートリアルに従って、CSシステムを調べ、取り込むテーブルのパスを見つけ、その構造に関する情報を入手し Platformました。 次のチュートリアルでこの情報を使用して、CSシステムからデータを 収集し、Platformに取り込むことができます。