Azure File Storage介面處於測試狀態。 有關使用beta標籤連接器的詳細資訊,請參閱來源概觀。
Flow Service 用於收集和集中Adobe Experience Platform內不同來源的客戶資料。該服務提供用戶介面和REST風格的API,所有支援的源都可從中連接。
本教學課程使用Flow Service API來引導您完成將Azure File Storage連接至Experience Platform的步驟。
本指南需要有效瞭解Adobe Experience Platform的下列元件:
以下各節提供您必須知道的其他資訊,以便使用Flow Service API成功連線至Azure File Storage。
要使Flow Service與Azure File Storage連接,必須為以下連接屬性提供值:
憑證 | 說明 |
---|---|
host |
您正在訪問的Azure File Storage實例的端點。 |
userId |
對Azure File Storage端點具有足夠訪問權限的用戶。 |
password |
Azure File Storage實例的密碼 |
連接規範ID | 建立連線所需的唯一識別碼。 Azure File Storage的連接規範ID為:be5ec48c-5b78-49d5-b8fa-7c89ec4569b8 |
有關入門的詳細資訊,請參閱此Azure檔案儲存文檔。
本教學課程提供範例API呼叫,以示範如何設定請求的格式。 這些包括路徑、必要標題和正確格式化的請求負載。 也提供API回應中傳回的範例JSON。 如需範例API呼叫檔案中所用慣例的詳細資訊,請參閱Experience Platform疑難排解指南中如何讀取範例API呼叫一節。
若要呼叫Platform API,您必須先完成驗證教學課程。 完成驗證教學課程後,所有Experience Platform API呼叫中每個所需標題的值都會顯示在下面:
Authorization: Bearer {ACCESS_TOKEN}
x-api-key: {API_KEY}
x-gw-ims-org-id: {IMS_ORG}
Experience Platform中的所有資源(包括屬於Flow Service的資源)都隔離到特定的虛擬沙盒。 對Platform API的所有請求都需要一個標題,該標題指定要在中執行操作的沙盒的名稱:
x-sandbox-name: {SANDBOX_NAME}
所有包含裝載(POST、PUT、PATCH)的請求都需要額外的媒體類型標題:
Content-Type: application/json
連接指定源,並包含該源的憑據。 每個Azure File Storage帳戶只需要一個連接,因為它可用於建立多個源連接器以導入不同的資料。
API格式
POST /connections
請求
要建立Azure File Storage連接,必須在POST請求中提供其唯一連接規範ID。 Azure File Storage的連接規範ID為be5ec48c-5b78-49d5-b8fa-7c89ec4569b8
。
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": "Azure File Storage connection",
"description": "An Azure File Storage test connection",
"auth": {
"specName": "Basic Authentication",
"params": {
"host": "{HOST}",
"userId": "{USER_ID}",
"password": "{PASSWORD}"
}
},
"connectionSpec": {
"id": "be5ec48c-5b78-49d5-b8fa-7c89ec4569b8",
"version": "1.0"
}
}'
屬性 | 說明 |
---|---|
auth.params.host |
您正在訪問的Azure File Storage實例的端點。 |
auth.params.userId |
對Azure File Storage端點具有足夠訪問權限的用戶。 |
auth.params.password |
Azure File Storage訪問密鑰。 |
connectionSpec.id |
Azure File Storage連接規範ID:be5ec48c-5b78-49d5-b8fa-7c89ec4569b8 。 |
回應
成功的響應返回新建立的連接的詳細資訊,包括其唯一標識符(id
)。 在下一個教學課程中探索資料時,需要此ID。
{
"id": "f9377f50-607a-4818-b77f-50607a181860",
"etag": "\"2f0276fa-0000-0200-0000-5eab3abb0000\""
}
在本教程中,您使用Flow Service API建立了Azure File Storage連接,並獲取了該連接的唯一ID值。 您可在下一個教學課程中使用此ID,同時學習如何使用Flow Service API](…/…/explore/cloud-storage.md)來探索協力廠商雲端儲存空間。[