Flow Service 用於收集及集中Adobe Experience Platform內各種不同來源的客戶資料。 此服務提供可連線所有支援來源的使用者介面和RESTful API。
本教學課程使用 Flow Service 用於探索行銷自動化系統的API。
本指南需要您實際瞭解下列Adobe Experience Platform元件:
以下小節提供您需要瞭解的其他資訊,才能使用成功連線至行銷自動化系統。 Flow Service API。
本教學課程需要您與您要從中擷取資料的協力廠商行銷自動化應用程式建立有效連線。 有效的連線涉及您應用程式的連線規格ID和連線ID。 有關建立行銷自動化連線及擷取這些值的詳細資訊,請參閱 將行銷自動化來源連線到Platform 教學課程。
本教學課程提供範例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
使用行銷自動化系統的基礎連線,您可以透過執行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/2fce94c1-9a93-4971-8e94-c19a93097129/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": "Hubspot.All_Deals",
"path": "Hubspot.All_Deals",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Hubspot.Blog_Authors",
"path": "Hubspot.Blog_Authors",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Hubspot.Blog_Comments",
"path": "Hubspot.Blog_Comments",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "Hubspot.Contacts",
"path": "Hubspot.Contacts",
"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/2fce94c1-9a93-4971-8e94-c19a93097129/explore?objectType=table&object=Hubspot.Contacts' \
-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": "Properties_Firstname_Value",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Properties_Lastname_Value",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Added_At",
"type": "string",
"meta:xdmType": "date-time",
"xdm": {
"type": "string",
"format": "date-time"
}
},
{
"name": "Portal_Id",
"type": "string",
"xdm": {
"type": "string"
}
},
]
}
}
依照本教學課程,您已探索行銷自動化系統,找到您要加入之表格的路徑 Platform,並取得有關其結構的資訊。 您可以在下一個教學課程中使用此資訊來 從行銷自動化系統收集資料,並將其帶入Platform.