使用Flow Service API探索資料表
最後更新: 2025年4月4日
建立對象:
- 開發人員
本教學課程提供如何使用Flow Service API來探索及預覽資料表的結構與內容的步驟。
快速入門
本指南需要您深入了解下列 Adobe Experience Platform 元件:
使用Experience Platform API
如需如何成功呼叫Experience Platform API的詳細資訊,請參閱Experience Platform API快速入門指南。
探索您的資料表
您可以在提供來源的基本連線ID的同時,對Flow Service API發出GET要求,以擷取資料表結構的資訊。
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}'
回應
成功的回應會從您的來源傳回資料表陣列。 尋找您要帶入Experience 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執行GET要求。
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"
}
}
]
}
}
337b99bb-92fb-42ae-b6b7-c7042161d089