的 Zendesk 来源为测试版。 请参阅 源概述 有关使用测试版标记的源的详细信息。
以下教程将指导您完成创建源连接和要引入的数据流的步骤 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中编码等于 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"
}
}
]
}
您可以通过向 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\""
}
要在Platform中使用源数据,必须创建目标架构以根据您的需求构建源数据。 然后,目标架构用于创建包含源数据的Platform数据集。
通过对 架构注册表API.
有关如何创建目标XDM架构的详细步骤,请参阅 使用API创建模式.
通过对 目录服务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 API,同时提供您要使用的流量ID、版本和新计划。
的 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和更新的标记。 您可以通过向 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(未找到)错误,表示数据流已被删除。
要更新连接的名称、说明和凭据,请向执行PATCH请求 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和更新的标记。 您可以通过向 Flow Service API,同时提供连接ID。
{
"id": "139f6a5f-a78b-4744-9f6a-5fa78bd74431",
"etag": "\"3600e378-0000-0200-0000-5f40212f0000\""
}
现有基本连接ID后,请对 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)请求来确认删除。