本教程提供了有关如何使用 Flow Service API。
本指南要求您对Adobe Experience Platform的以下组件有一定的了解:
有关如何成功调用Platform API的信息,请参阅 Platform API快速入门.
您可以通过向 Flow Service API,同时提供源的基本连接ID。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
参数 | 描述 |
---|---|
{BASE_CONNECTION_ID} |
源的基本连接ID。 |
请求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/5e73e5a2-dc36-45a8-9f16-93c7a43af318/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}'
响应
成功的响应会从源中返回一个表数组。 查找要引入Platform的表,并注意其 path
资产,因为您需要在下一步中提供该资产以检查其结构。
[
{
"type": "table",
"name": "ACME Spring Campaign",
"path": "acmeSpringCampaign",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "ACME Summer Campaign",
"path": "acmeSummerCampaign",
"canPreview": true,
"canFetchSchema": true
}
]
要检查数据表的内容,请向 Flow Service 将表的路径指定为查询参数时的API。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
参数 | 描述 |
---|---|
{BASE_CONNECTION_ID} |
源的基本连接ID。 |
{TABLE_PATH} |
要检查的表的路径属性。 |
请求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/5e73e5a2-dc36-45a8-9f16-93c7a43af318/explore?objectType=table&object=acmeSpringCampaign' \
-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": "TestID",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Name",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Datefield",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
},
{
"name": "complaint_type",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "complaint_description",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "status",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "status_change_date",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
},
{
"name": "city",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Datefield2",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
}
]
}
}
通过阅读本教程,您已收集了有关数据表结构和内容的信息。 此外,您还检索了要摄取到平台中的表的路径。 您可以使用此信息创建源连接和数据流,以将数据引入平台。 有关如何使用创建源连接和数据流的具体步骤,请参阅以下教程 Flow Service API: