Flow Service 用于收集和集中Adobe Experience Platform内不同来源的客户数据。 该服务提供了用户界面和RESTful API,所有受支持的源都可从中连接。
本教程使用 Flow Service 用于浏览协议应用程序的API。
本指南要求您对Adobe Experience Platform的以下组件有一定的了解:
以下各节提供了您需要了解的其他信息,以便使用成功连接到协议应用程序 Flow Service API。
为了探索您的协议系统,请使用 Platform API,您必须拥有有效的基本连接ID。 如果您尚未希望使用的协议系统的基本连接,则可以通过以下教程创建一个:
本教程提供了用于演示如何设置请求格式的示例API调用。 这包括路径、所需标头以及格式正确的请求负载。 还提供了API响应中返回的示例JSON。 有关示例API调用文档中使用的约定的信息,请参阅 如何阅读示例API调用 在 Experience Platform 疑难解答指南。
为了调用 Platform API,您必须先完成 身份验证教程. 完成身份验证教程将为所有中每个所需标头提供值 Experience Platform API调用,如下所示:
{ACCESS_TOKEN}
{API_KEY}
{ORG_ID}
中的所有资源 Experience Platform,包括属于 Flow Service,与特定虚拟沙箱隔离。 对 Platform API需要一个标头来指定操作将在其中执行的沙盒的名称:
{SANDBOX_NAME}
所有包含有效负载(POST、PUT、PATCH)的请求都需要额外的媒体类型标头:
application/json
使用协议应用程序的连接ID,您可以通过执行GET请求来浏览数据表。 使用以下调用查找要检查或摄取到的表的路径 Platform.
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
参数 | 描述 |
---|---|
{BASE_CONNECTION_ID} |
协议基连接的ID。 |
请求
curl -X GET \
'http://platform.adobe.io/data/foundation/flowservice/connections/a5c6b647-e784-4b58-86b6-47e784ab580b/explore?objectType=root' \
-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}'
响应
成功的响应会从协议应用程序返回一个表数组。 找你想进去的桌子 Platform 并注意 path
资产,因为您需要在下一步中提供该资产以检查其结构。
[
{
"type": "table",
"name": "Categories",
"path": "Categories",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "CustomerDemographics",
"path": "CustomerDemographics",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Customers",
"path": "Customers",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Orders",
"path": "Orders",
"canPreview": true,
"canFetchSchema": true
}
]
要从协议应用程序中检查表的结构,请在将表的路径指定为查询参数时执行GET请求。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
参数 | 描述 |
---|---|
{BASE_CONNECTION_ID} |
协议应用程序的连接ID。 |
{TABLE_PATH} |
协议应用程序中表的路径。 |
curl -X GET \
'http://platform.adobe.io/data/foundation/flowservice/connections/a5c6b647-e784-4b58-86b6-47e784ab580b/explore?objectType=table&object=Orders' \
-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}'
响应
成功的响应会返回指定表的结构。 有关每个表列的详细信息位于 columns
数组。
{
"format": "flat",
"schema": {
"columns": [
{
"name": "OrderID",
"type": "integer",
"xdm": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
{
"name": "CustomerID",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "EmployeeID",
"type": "integer",
"xdm": {
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
}
},
{
"name": "OrderDate",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
},
]
}
}
通过阅读本教程,您探索了协议应用程序,找到了要引入到的表的路径 Platform,并获取了有关其结构的信息。 在下一个教程中,您可以在 从协议应用程序中收集数据并将其导入平台.