Flow Service は、Adobe Experience Platform内のさまざまな異なるソースから顧客データを収集し、一元化するために使用されます。 このサービスは、ユーザーインターフェイスとRESTful APIを提供し、サポートされるすべてのソースを接続できます。
サードパーティのソースのデータをソースに接続するに Platformは、まずデータセットベースの接続を確立する必要があります。
このチュートリアルでは、 Flow Service APIを使用して、データセットベースの接続を作成する手順を順を追って説明します。
このチュートリアルは、Adobe Experience Platform の次のコンポーネントを実際に利用および理解しているユーザーを対象としています。
{TENANT_ID}
、「コンテナ」の概念、リクエストをおこなうために必要なヘッダー(Accept ヘッダーとその可能な値に特に注意)が含まれます。The following sections provide additional information that you will need to know in order to successfully connect to Data Lake using the Flow Service API.
このチュートリアルでは、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:
Authorization: Bearer {ACCESS_TOKEN}
x-api-key: {API_KEY}
x-gw-ims-org-id: {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:
x-sandbox-name: {SANDBOX_NAME}
ペイロード(POST、PUT、PATCH)を含むすべてのリクエストには、メディアのタイプを指定する以下のような追加ヘッダーが必要です。
Content-Type: application/json
データセットベースの接続を作成する最初の手順は、内から一連の接続仕様を取得すること Flow Serviceです。
API 形式
使用可能な各ソースには、認証要件などのコネクタプロパティを記述するための固有の接続仕様のセットがあります。 GETリクエストを実行し、クエリパラメーターを使用して、データセットベースの接続の接続仕様を調べることができます。
クエリパラメーターを指定しないでGETリクエストを送信すると、使用可能なすべてのソースの接続仕様が返されます。 クエリを組み込むと、データセットベース property=id=="c604ff05-7f1a-43c0-8e18-33bf874cb11c"
の接続に関する情報を取得できます。
GET /connectionSpecs
GET /connectionSpecs?property=id=="c604ff05-7f1a-43c0-8e18-33bf874cb11c"
リクエスト
次のリクエストは、データセットベース接続の接続仕様を取得します。
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs?property=id=="c604ff05-7f1a-43c0-8e18-33bf874cb11c"' \
-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}'
応答
正常な応答は、接続仕様と、ベース接続の作成に必要な固有識別子(id
)を返します。
{
"items": [
{
"id": "c604ff05-7f1a-43c0-8e18-33bf874cb11c",
"name": "{NAME}",
"providerId": "0ed90a81-07f4-4586-8190-b40eccef1c5a",
"version": "1.0",
"targetSpec": {
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dataSetId": {
"type": "string"
}
},
"required": [
"dataSetId"
]
}
},
"attributes": {
"category": "{CATEGORY}"
},
"permissionsInfo": {
"view": [
{
"@type": "lowLevel",
"name": "Dataset",
"permissions": [
"read"
]
}
],
"manage": [
{
"@type": "lowLevel",
"name": "Dataset",
"permissions": [
"write"
]
}
]
}
}
]
}
ベース接続はソースを指定し、そのソースの資格情報を含みます。 異なるデータを取り込む複数のソースコネクターを作成する場合に使用できるので、必要なデータセットベース接続は1つだけです。
API 形式
POST /connections
リクエスト
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: {IMS_ORG}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dataset Base Connection",
"description": "Dataset Base Connection",
"connectionSpec": {
"id": "c604ff05-7f1a-43c0-8e18-33bf874cb11c",
"version": "1.0"
}
}'
プロパティ | 説明 |
---|---|
connectionSpec.id |
前の手順で取得 id した接続仕様。 |
応答
正常な応答は、新たに作成されたベース接続の詳細(一意の識別子(id
)を含む)を返します。 このIDは、ターゲット接続を作成し、サードパーティのソースコネクタからデータを取り込むために必要です。
{
"id": "d6c3988d-14ef-4000-8398-8d14ef000021",
"etag": "\"d502e61b-0000-0200-0000-5e62a1f90000\""
}
このチュートリアルに従うと、 Flow Service APIを使用したデータセットベースの接続を作成し、接続の一意のID値を取得したことになります。 この基本接続を使用して、ターゲット接続を作成できます。 次のチュートリアルでは、使用するソースコネクタのカテゴリに応じて、ターゲット接続を作成する手順を説明します。