Adobe Experience Platform可讓您從外部來源擷取資料,同時提供您使用服務建構、標示及增強傳入資料的 Platform 能力。 您可以從多種來源(例如Adobe應用程式、雲端儲存空間、資料庫等)擷取資料。
Flow Service 用於收集和集中Adobe Experience Platform內不同來源的客戶資料。 該服務提供用戶介面和REST風格的API,所有支援的源都可從中連接。
本教學課程涵蓋使用監控流程執行資料的完整性、錯誤和度量的步驟 Flow Service API。
本教程要求您具有有效資料流的ID值。 如果您沒有有效的資料流ID,請從源概述中選擇選擇的 連接器 ,並遵循在嘗試本教程之前概述的步驟。
本教學課程也要求您對Adobe Experience Platform的下列元件有正確的認識:
以下各節提供您需要知道的其他資訊,以便使用 Flow Service API成功監控流程執行。
本教學課程提供範例API呼叫,以示範如何設定請求的格式。 這些包括路徑、必要標題和正確格式化的請求負載。 也提供API回應中傳回的範例JSON。 如需範例API呼叫檔案中所用慣例的詳細資訊,請參閱疑難排解指 南中有關如何讀取範例API呼叫的 Experience Platform 章節。
若要呼叫API,您必 Platform 須先完成驗證教 學課程。 完成驗證教學課程後,將提供所有 Experience Platform API呼叫中每個必要標題的值,如下所示:
Authorization: Bearer {ACCESS_TOKEN}
x-api-key: {API_KEY}
x-gw-ims-org-id: {IMS_ORG}
中的所有資 Experience Platform源(包括屬於這些資源 Flow Service)都隔離到特定的虛擬沙盒。 對API的所 Platform 有請求都需要一個標題,該標題會指定要在中執行的操作的沙盒名稱:
x-sandbox-name: {SANDBOX_NAME}
所有包含裝載(POST、PUT、PATCH)的請求都需要額外的媒體類型標題:
Content-Type: application/json
在進行資料流後,請對 Flow Service API執行GET請求。
API格式
GET /runs?property=flowId=={FLOW_ID}
參數 | 說明 |
---|---|
{FLOW_ID} |
要監視 id 的資料流的唯一值。 |
請求
以下請求將檢索現有資料流的規範。
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/runs?property=flowId==c9cef9cb-c934-4467-8ef9-cbc934546741' \
-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}'
回應
成功的回應會傳回有關您的流程執行的詳細資料,包括其建立日期、來源和目標連線的資訊,以及流程執行的唯一識別碼(id
)。
{
"items": [
{
"createdAt": 1596656079576,
"updatedAt": 1596656113526,
"createdBy": "{CREATED_BY}",
"updatedBy": "{UPDATED_BY}",
"createdClient": "{CREATED_CLIENT}",
"updatedClient": "{UPDATED_CLIENT}",
"sandboxId": "1bd86660-c5da-11e9-93d4-6d5fc3a66a8e",
"sandboxName": "prod",
"id": "9830305a-985f-47d0-b030-5a985fd7d004",
"flowId": "c9cef9cb-c934-4467-8ef9-cbc934546741",
"etag": "\"b8003af1-0000-0200-0000-5f2b09f10000\"",
"metrics": {
"durationSummary": {
"startedAtUTC": 1596656058198,
"completedAtUTC": 1596656113306
},
"sizeSummary": {
"inputBytes": 24012,
"outputBytes": 17128
},
"recordSummary": {
"inputRecordCount": 100,
"outputRecordCount": 99,
"failedRecordCount": 1
},
"fileSummary": {
"inputFileCount": 1,
"outputFileCount": 1,
"activityRefs": [
"promotionActivity"
]
},
"statusSummary": {
"status": "success",
"errors": [
{
"code": "CONNECTOR-2001-500",
"message": "Error occurred at promotion activity."
}
],
"activityRefs": [
"promotionActivity"
]
}
},
"activities": [
{
"id": "copyActivity",
"updatedAtUTC": 1596656095088,
"durationSummary": {
"startedAtUTC": 1596656058198,
"completedAtUTC": 1596656089650,
"extensions": {
"windowStart": 1596653708000,
"windowEnd": 1596655508000
}
},
"sizeSummary": {
"inputBytes": 24012,
"outputBytes": 24012
},
"recordSummary": {},
"fileSummary": {
"inputFileCount": 1,
"outputFileCount": 1
},
"statusSummary": {
"status": "success",
"extensions": {
"type": "one-time"
}
},
"sourceInfo": [
{
"id": "c0e18602-f9ea-44f9-a186-02f9ea64f9ac",
"type": "SourceConnection",
"reference": {
"type": "AdfRunId",
"ids": [
"8a8eb0cc-e283-4605-ac70-65a5adb1baef"
]
}
}
]
},
{
"id": "promotionActivity",
"updatedAtUTC": 1596656113485,
"durationSummary": {
"startedAtUTC": 1596656095333,
"completedAtUTC": 1596656113306
},
"sizeSummary": {
"inputBytes": 24012,
"outputBytes": 17128
},
"recordSummary": {
"inputRecordCount": 100,
"outputRecordCount": 99,
"failedRecordCount": 1
},
"fileSummary": {
"inputFileCount": 2,
"outputFileCount": 1,
"extensions": {
"manifest": {
"fileInfo": "https://platform-int.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=input_files"
}
}
},
"statusSummary": {
"status": "success",
"errors": [
{
"code": "CONNECTOR-2001-500",
"message": "Error occurred at promotion activity."
}
],
"extensions": {
"manifest": {
"failedRecords": "https://platform-int.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=row_errors",
"sampleErrors": "https://platform-int.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=row_error_samples.json"
},
"errors": [
{
"code": "INGEST-1212-400",
"message": "Encountered 1 errors in the data. Successfully ingested 99 rows. Review the associated diagnostic files for additional details."
},
{
"code": "MAPPER-3700-400",
"recordCount": 1,
"message": "Mapper Transform Error"
}
]
}
},
"targetInfo": [
{
"id": "47166b83-01c7-4b65-966b-8301c70b6562",
"type": "TargetConnection",
"reference": {
"type": "Batch",
"ids": [
"01EF01X41KJD82Y9ZX6ET54PCZ"
]
}
}
]
}
]
}
],
"_links": {}
}
屬性 | 說明 |
---|---|
items |
包含與特定流程執行相關聯之中繼資料的單一裝載。 |
metrics |
定義流運行中資料的特性。 |
activities |
定義資料的轉換方式。 |
durationSummary |
定義流運行的開始和結束時間。 |
sizeSummary |
定義資料的卷(以位元組為單位)。 |
recordSummary |
定義資料的記錄計數。 |
fileSummary |
定義資料的檔案計數。 |
statusSummary |
定義流運行是成功還是失敗。 |
在本教學課程之後,您已使用 Flow Service API檢索了資料流的度量和錯誤資訊。 您現在可以根據您的接收計畫繼續監視資料流,以跟蹤其狀態和接收速率。 有關如何使用用戶介面執行相同任務的資訊,請參見有關使用用戶介面監 控資料流的教程