的 Zendesk 源為beta。 查看 源概述 的子菜單。
以下教程將指導您完成建立源連接和資料流的步驟,以便 Zendesk 資料到平台 Flow Service API。
本指南要求對以下Experience Platform元件進行工作理解:
以下各節提供了要成功連接到所需的其他資訊 Zendesk 使用 Flow Service API。
為了訪問 Zendesk 帳戶,必須為以下憑據提供值:
憑據 | 說明 | 範例 |
---|---|---|
host |
在註冊過程中建立的特定於您帳戶的唯一域。 | https://yoursubdomain.zendesk.com |
accessToken |
Zendesk API令牌。 | 0lZnClEvkJSTQ7olGLl7PMhVq99gu26GTbJtf |
有關驗證您 Zendesk 源,請參閱 Zendesk 源概述。
以下教程將指導您完成建立 Zendesk 源連接並建立資料流,以便 Zendesk 資料到平台 Flow Service API。
基本連接將保留源和平台之間的資訊,包括源的驗證憑據、連接的當前狀態和唯一的基本連接ID。 基本連接ID允許您從源中瀏覽和導航檔案,並標識要攝取的特定項目,包括有關其資料類型和格式的資訊。
要建立基本連接ID,請向 /connections
提供端點 Zendesk 身份驗證憑據作為請求正文的一部分。
API格式
POST /connections
要求
以下請求為 Zendesk:
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": "Zendesk base connection",
"description": "Zendesk base connection to authenticate to Platform",
"connectionSpec": {
"id": "0a27232b-2c6e-4396-b8c6-c9fc24e37ba4",
"version": "1.0"
},
"auth": {
"specName": "OAuth2 Refresh Code",
"params": {
"host": "{HOST}",
"accessToken": "{ACCESS_TOKEN}"
}
}
}'
屬性 | 說明 |
---|---|
name |
基本連接的名稱。 確保基本連接的名稱是描述性的,因為您可以使用此名稱查找有關基本連接的資訊。 |
description |
可以包括的可選值,用於提供有關基本連接的詳細資訊。 |
connectionSpec.id |
源的連接規範ID。 在通過註冊和批准源後,可以檢索此ID Flow Service API。 |
auth.specName |
用於將源驗證到平台的驗證類型。 |
auth.params. |
包含驗證源所需的憑據。 |
auth.params.host |
在註冊過程中建立的特定於您帳戶的唯一域。 子域的格式為 https://yoursubdomain.zendesk.com 。 |
auth.params.accessToken |
用於驗證源的相應訪問令牌。 這是基於OAuth的身份驗證所必需的。 |
回應
成功的響應返回新建立的基本連接,包括其唯一連接標識符(id
)。 在下一步中瀏覽源的檔案結構和內容需要此ID。
{
"id": "70383d02-2777-4be7-a309-9dd6eea1b46d",
"etag": "\"d64c8298-add4-4667-9a49-28195b2e2a84\""
}
使用上一步中生成的基本連接ID,可以通過執行GET請求來瀏覽檔案和目錄。
使用以下調用查找要插入的檔案的路徑 Platform:
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=rest&object={OBJECT}&fileType={FILE_TYPE}&preview={PREVIEW}&sourceParams={SOURCE_PARAMS}
執行GET請求以瀏覽源的檔案結構和內容時,必須包括下表中列出的查詢參數:
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
在上一步中生成的基本連接ID。 |
objectType=rest |
要瀏覽的對象的類型。 當前,此值始終設定為 rest 。 |
{OBJECT} |
僅當查看特定目錄時才需要此參數。 其值表示要瀏覽的目錄的路徑。 |
fileType=json |
要帶到平台的檔案的檔案類型。 目前, json 是唯一支援的檔案類型。 |
{PREVIEW} |
一個布爾值,它定義連接的內容是否支援預覽。 |
{SOURCE_PARAMS} |
定義要帶到平台的源檔案的參數。 檢索接受的格式類型 {SOURCE_PARAMS} ,您必須對整個 parameter base64中的字串。 在下面的示例中, "{}" 編碼為base64等於 e30 。 |
要求
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/70383d02-2777-4be7-a309-9dd6eea1b46d/explore?objectType=rest&object=json&fileType=json&preview=true&sourceParams=e30' \
-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}'
回應
成功的響應返回查詢檔案的結構。 在以下示例中, data[]
只顯示一個記錄的負載,但可能有多個記錄。
{
"format": "hierarchical",
"schema": {
"type": "object",
"properties": {
"result": {
"type": "object",
"properties": {
"organization_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"external_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"role_type": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"custom_role_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"default_group_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"phone": {
"type": "string"
},
"shared_phone_number": {
"type": "boolean"
},
"alias": {
"type": "string"
},
"last_login_at": {
"type": "string"
},
"signature": {
"type": "string"
},
"details": {
"type": "string"
},
"notes": {
"type": "string"
},
"photo": {
"type": "string",
"media": {
"binaryEncoding": "base64",
"type": "image/png"
}
},
"active": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"iana_time_zone": {
"type": "string"
},
"id": {
"type": "integer"
},
"locale": {
"type": "string"
},
"locale_id": {
"type": "integer"
},
"moderator": {
"type": "boolean"
},
"name": {
"type": "string"
},
"only_private_comments": {
"type": "boolean"
},
"report_csv": {
"type": "boolean"
},
"restricted_agent": {
"type": "boolean"
},
"result_type": {
"type": "string"
},
"role": {
"type": "integer"
},
"shared": {
"type": "boolean"
},
"shared_agent": {
"type": "boolean"
},
"suspended": {
"type": "boolean"
},
"ticket_restriction": {
"type": "string"
},
"time_zone": {
"type": "string"
},
"two_factor_auth_enabled": {
"type": "boolean"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
},
"verified": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"data": [
{
"result": {
"id": 6106699702801,
"url": "https://{YOURSUBDOMAIN}.zendesk.com/api/v2/users/6106699702801.json",
"name": "test",
"email": "test@org.com",
"created_at": "2022-05-13T08:04:22Z",
"updated_at": "2022-05-13T08:04:22Z",
"time_zone": "Asia/Kolkata",
"iana_time_zone": "Asia/Kolkata",
"locale_id": 1,
"locale": "en-US",
"role": "end-user",
"verified": false,
"active": true,
"shared": false,
"shared_agent": false,
"two_factor_auth_enabled": false,
"moderator": false,
"ticket_restriction": "requested",
"only_private_comments": false,
"restricted_agent": true,
"suspended": false,
"report_csv": false,
"result_type": "user"
}
}
]
}
您可以通過向POST請求建立源連接 Flow Service API。 源連接由連接ID、源資料檔案的路徑和連接規範ID組成。
API格式
POST /sourceConnections
要求
以下請求為 Zendesk:
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/sourceConnections' \
-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": "Zendesk Source Connection",
"description": "Zendesk Source Connection",
"baseConnectionId": "70383d02-2777-4be7-a309-9dd6eea1b46d",
"connectionSpec": {
"id": "0a27232b-2c6e-4396-b8c6-c9fc24e37ba4",
"version": "1.0"
},
"data": {
"format": "json"
},
"params": {}
}'
屬性 | 說明 |
---|---|
name |
源連接的名稱。 確保源連接的名稱是描述性的,因為您可以使用它來查找有關源連接的資訊。 |
description |
可以包括的可選值,用於提供有關源連接的詳細資訊。 |
baseConnectionId |
基本連接ID Zendesk。 此ID是在前一步驟中生成的。 |
connectionSpec.id |
與源對應的連接規範ID。 |
data.format |
格式 Zendesk 要攝取的資料。 目前,唯一支援的資料格式是 json 。 |
回應
成功的響應返回唯一標識符(id
)。 在後續步驟中建立資料流時需要此ID。
{
"id": "246d052c-da4a-494a-937f-a0d17b1c6cf5",
"etag": "\"712a8c08-fda7-41c2-984b-187f823293d8\""
}
為了在平台中使用源資料,必須建立目標架構以根據您的需要來構造源資料。 然後使用目標模式建立包含源資料的平台資料集。
通過執行對目標XDM的POST請求,可以建立目標XDM模式 架構註冊表API。
有關如何建立目標XDM架構的詳細步驟,請參見上的教程 使用API建立架構。
通過對目標資料集執行POST請求,可以建立目標資料集 目錄服務API,提供負載內目標架構的ID。
有關如何建立目標資料集的詳細步驟,請參見上的教程 使用API建立資料集。
目標連接表示到要儲存所攝取資料的目的地的連接。 要建立目標連接,必須提供與資料湖相對應的固定連接規範ID。 此ID為: c604ff05-7f1a-43c0-8e18-33bf874cb11c
。
您現在將唯一標識符作為目標模式、目標資料集和到資料湖的連接規範ID。 使用這些標識符,可以使用 Flow Service API,用於指定將包含入站源資料的資料集。
API格式
POST /targetConnections
要求
以下請求為Zendesk建立目標連接:
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
-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": "Zendesk Target Connection",
"description": "Zendesk Target Connection",
"connectionSpec": {
"id": "c604ff05-7f1a-43c0-8e18-33bf874cb11c",
"version": "1.0"
},
"data": {
"format": "json"
},
"params": {
"dataSetId": "624bf42e16519d19496e3f67"
}
}'
屬性 | 說明 |
---|---|
name |
目標連接的名稱。 確保目標連接的名稱是描述性的,因為您可以使用此名稱查找有關目標連接的資訊。 |
description |
可以包括的可選值,用於提供有關目標連接的詳細資訊。 |
connectionSpec.id |
與資料湖對應的連接規範ID。 此固定ID為: c604ff05-7f1a-43c0-8e18-33bf874cb11c 。 |
data.format |
格式 Zendesk 要帶到平台的資料。 |
params.dataSetId |
在上一步中檢索到的目標資料集ID。 |
回應
成功的響應返回新目標連接的唯一標識符(id
)。 後續步驟中需要此ID。
{
"id": "7c96c827-3ffd-460c-a573-e9558f72f263",
"etag": "\"a196f685-f5e8-4c4c-bfbd-136141bb0c6d\""
}
為了將源資料攝取到目標資料集中,必須首先將其映射到目標資料集所遵循的目標模式。 這通過執行POST請求來實現 Data Prep API 在請求負載中定義資料映射。
API格式
POST /conversion/mappingSets
要求
curl -X POST \
'https://platform.adobe.io/data/foundation/conversion/mappingSets' \
-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 '{
"version": 0,
"xdmSchema": "https://ns.adobe.com/{TENANT_ID}/schemas/995dabbea86d58e346ff91bd8aa741a9f36f29b1019138d4",
"xdmVersion": "1.0",
"mappings": [
{
"sourceType": "ATTRIBUTE",
"source": "result.id",
"destination": "_extconndev.id",
"name": "id",
"description": "Zendesk"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.external_id",
"destination": "_extconndev.external_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.role_type",
"destination": "_extconndev.role_type"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.custom_role_id",
"destination": "_extconndev.custom_role_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.default_group_id",
"destination": "_extconndev.default_group_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.phone",
"destination": "_extconndev.phone"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.shared_phone_number",
"destination": "_extconndev.shared_phone_number"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.verified",
"destination": "_extconndev.verified"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.alias",
"destination": "_extconndev.alias"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.last_login_at",
"destination": "_extconndev.last_login_at"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.signature",
"destination": "_extconndev.signature"
}, {
"sourceType": "ATTRIBUTE",
"source": "result.details",
"destination": "_extconndev.details"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.notes",
"destination": "_extconndev.notes"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.active",
"destination": "_extconndev.active"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.created_at",
"destination": "_extconndev.created_at"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.email",
"destination": "_extconndev.email"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.iana_time_zone",
"destination": "_extconndev.iana_time_zone"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.organization_id",
"destination": "_extconndev.organization_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.locale",
"destination": "_extconndev.locale"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.locale_id",
"destination": "_extconndev.locale_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.moderator",
"destination": "_extconndev.moderator"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.name",
"destination": "_extconndev.name"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.only_private_comments",
"destination": "_extconndev.only_private_comments"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.report_csv",
"destination": "_extconndev.report_csv"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.restricted_agent",
"destination": "_extconndev.restricted_agent"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.result_type",
"destination": "_extconndev.result_type"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.role",
"destination": "_extconndev.role"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.shared",
"destination": "_extconndev.shared"
}, {
"sourceType": "ATTRIBUTE",
"source": "result.shared_agent",
"destination": "_extconndev.shared_agent"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.time_zone",
"destination": "_extconndev.time_zone"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.two_factor_auth_enabled",
"destination": "_extconndev.two_factor_auth_enabled"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.suspended",
"destination": "_extconndev.suspended"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.updated_at",
"destination": "_extconndev.updated_at"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.url",
"destination": "_extconndev.url"
},
{
"sourceType": "ATTRIBUTE",
"source": "result.verified",
"destination": "_extconndev.verified"
}
]
}'
屬性 | 說明 |
---|---|
xdmSchema |
的ID 目標XDM架構 生成。 |
mappings.destinationXdmPath |
要映射源屬性的目標XDM路徑。 |
mappings.sourceAttribute |
需要映射到目標XDM路徑的源屬性。 |
mappings.identity |
一個布爾值,它指定是否將映射集標籤為 Identity Service。 |
回應
成功的響應返回新建立的映射的詳細資訊,包括其唯一標識符(id
)。 在後續步驟中建立資料流時需要此值。
{
"id": "bf5286a9c1ad4266baca76ba3adc9366",
"version": 0,
"createdDate": 1597784069368,
"modifiedDate": 1597784069368,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}"
}
將資料從Zendesk帶到平台的最後一步是建立資料流。 現在,您準備了以下必需值:
資料流負責從源調度和收集資料。 通過在負載中提供先前提到的值的同時執行POST請求,可以建立資料流。
要計畫攝取,必須首先將開始時間值設定為劃時代(秒)。 然後,必須將頻率值設定為以下五個選項之一: once
。 minute
。 hour
。 day
或 week
。 該間隔值指定兩個連續接收之間的期間,但建立一次性接收不需要設定間隔。 對於所有其它頻率,間隔值必須設定為等於或大於 15
。
API格式
POST /flows
要求
curl -X POST \
'https://platform.adobe.io/data/foundation/flowservice/flows' \
-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": "Zendesk dataflow",
"description": "Zendesk dataflow",
"flowSpec": {
"id": "6499120c-0b15-42dc-936e-847ea3c24d72",
"version": "1.0"
},
"sourceConnectionIds": [
"246d052c-da4a-494a-937f-a0d17b1c6cf5"
],
"targetConnectionIds": [
"7c96c827-3ffd-460c-a573-e9558f72f263"
],
"transformations": [
{
"name": "Mapping",
"params": {
"mappingId": "bf5286a9c1ad4266baca76ba3adc9366",
"mappingVersion": "0"
}
}
],
"scheduleParams": {
"startTime": "1625040887",
"frequency": "minute",
"interval": 15
}
}'
屬性 | 說明 |
---|---|
name |
資料流的名稱。 確保資料流的名稱是描述性的,因為您可以使用此名稱查找有關資料流的資訊。 |
description |
可以包括的可選值,用於提供有關資料流的詳細資訊。 |
flowSpec.id |
建立資料流所需的流規範ID。 此固定ID為: 6499120c-0b15-42dc-936e-847ea3c24d72 。 |
flowSpec.version |
流規範ID的相應版本。 此值預設為 1.0 。 |
sourceConnectionIds |
的 源連接ID 生成。 |
targetConnectionIds |
的 目標連接ID 生成。 |
transformations |
此屬性包含需要應用於資料的各種轉換。 將不符合XDM的資料帶入平台時需要此屬性。 |
transformations.name |
分配給轉換的名稱。 |
transformations.params.mappingId |
的 映射ID 生成。 |
transformations.params.mappingVersion |
映射ID的相應版本。 此值預設為 0 。 |
scheduleParams.startTime |
此屬性包含有關資料流的接收調度的資訊。 |
scheduleParams.frequency |
資料流收集資料的頻率。 可接受值包括: once 。 minute 。 hour 。 day 或 week 。 |
scheduleParams.interval |
該間隔指定兩個連續流運行之間的期間。 間隔的值應為非零整數。 頻率設定為時不需要間隔 once 應大於或等於 15 其他頻率值。 |
回應
成功的響應返回ID(id
)。 您可以使用此ID監視、更新或刪除資料流。
{
"id": "993f908f-3342-4d9c-9f3c-5aa9a189ca1a",
"etag": "\"510bb1d4-8453-4034-b991-ab942e11dd8a\""
}
建立資料流後,您可以監視正在通過其接收的資料,以查看有關流運行、完成狀態和錯誤的資訊。
API格式
GET /runs?property=flowId=={FLOW_ID}
要求
以下請求檢索現有資料流的規範。
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/runs?property=flowId==993f908f-3342-4d9c-9f3c-5aa9a189ca1a' \
-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": "993f908f-3342-4d9c-9f3c-5aa9a189ca1a",
"etag": "\"510bb1d4-8453-4034-b991-ab942e11dd8a\"",
"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.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.adobe.io/data/foundation/export/batches/01EF01X41KJD82Y9ZX6ET54PCZ/meta?path=row_errors",
"sampleErrors": "https://platform.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 提供流ID、版本和要使用的新計畫時的API。
的 If-Match
發出PATCH請求時需要標頭。 此標頭的值是要更新的資料流的唯一標籤。
API格式
PATCH /flows/{FLOW_ID}
要求
以下請求將更新流運行計畫以及資料流的名稱和說明。
curl -X PATCH \
'https://platform.adobe.io/data/foundation/flowservice/flows/993f908f-3342-4d9c-9f3c-5aa9a189ca1a' \
-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 'If-Match: "1a0037e4-0000-0200-0000-602e06f60000"' \
-d '[
{
"op": "replace",
"path": "/scheduleParams/frequency",
"value": "day"
},
{
"op": "replace",
"path": "/name",
"value": "New dataflow name"
},
{
"op": "replace",
"path": "/description",
"value": "Updated dataflow description"
}
]'
參數 | 說明 |
---|---|
op |
用於定義更新資料流所需操作的操作調用。 操作包括: add 。 replace , remove 。 |
path |
要更新的參數的路徑。 |
value |
要用更新參數的新值。 |
回應
成功的響應將返回流ID和更新的etag。 您可以通過向Web站點發出GET請求來驗證更新 Flow Service API,同時提供流ID。
{
"id": "993f908f-3342-4d9c-9f3c-5aa9a189ca1a",
"etag": "\"50014cc8-0000-0200-0000-6036eb720000\""
}
使用現有流ID,可以通過執行對的DELETE請求來刪除資料流 Flow Service API。
API格式
DELETE /flows/{FLOW_ID}
參數 | 說明 |
---|---|
{FLOW_ID} |
獨特 id 要刪除的資料流的值。 |
要求
curl -X DELETE \
'https://platform.adobe.io/data/foundation/flowservice/flows/993f908f-3342-4d9c-9f3c-5aa9a189ca1a' \
-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}'
回應
成功的響應返回HTTP狀態204(無內容)和空白正文。 您可以通過嘗試對資料流進行查找(GET)請求來確認刪除。 API將返回HTTP 404(未找到)錯誤,表示資料流已被刪除。
要更新連接的名稱、說明和憑據,請向 Flow Service API,同時提供您要使用的基本連接ID、版本和新資訊。
的 If-Match
發出PATCH請求時需要標頭。 此標頭的值是要更新的連接的唯一版本。
API格式
PATCH /connections/{BASE_CONNECTION_ID}
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
獨特 id 要更新的連接的值。 |
要求
以下請求提供了新名稱和說明以及一組新的憑據,以更新您的連接。
curl -X PATCH \
'https://platform.adobe.io/data/foundation/flowservice/connections/139f6a5f-a78b-4744-9f6a-5fa78bd74431' \
-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 'If-Match: 1400dd53-0000-0200-0000-5f3f23450000' \
-d '[
{
"op": "replace",
"path": "/auth/params",
"value": {
"username": "{USERNAME}",
"password": "{NEW_PASSWORD}",
"securityToken": "{NEW_SECURITY_TOKEN}"
}
},
{
"op": "replace",
"path": "/name",
"value": "Zendesk connection"
},
{
"op": "add",
"path": "/description",
"value": "Zendesk connection"
}
]'
參數 | 說明 |
---|---|
op |
用於定義更新連接所需操作的操作調用。 操作包括: add 。 replace , remove 。 |
path |
要更新的參數的路徑。 |
value |
要用更新參數的新值。 |
回應
成功的響應將返回基本連接ID和更新的etag。 您可以通過向Web站點發出GET請求來驗證更新 Flow Service API,同時提供連接ID。
{
"id": "139f6a5f-a78b-4744-9f6a-5fa78bd74431",
"etag": "\"3600e378-0000-0200-0000-5f40212f0000\""
}
一旦您擁有現有基本連接ID,請執行DELETE請求 Flow Service API。
API格式
DELETE /connections/{CONNECTION_ID}
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
獨特 id 要刪除的基本連接的值。 |
要求
curl -X DELETE \
'https://platform.adobe.io/data/foundation/flowservice/connections/dd3631cd-d0ea-4fea-b631-cdd0ea6fea21' \
-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}'
回應
成功的響應返回HTTP狀態204(無內容)和空白正文。
您可以通過嘗試查找(GET)連接請求來確認刪除。