以下教程将指导您完成创建 SugarCRM Accounts & Contacts 源连接并创建数据流以引入 SugarCRM 使用向Adobe Experience Platform发送客户和联系人数据 Flow Service API.
本指南要求您对Experience Platform的以下组件有一定的了解:
以下部分提供成功连接时需要了解的其他信息 SugarCRM 使用 Flow Service API。
为了连接 SugarCRM Accounts & Contacts 到Platform时,必须提供以下连接属性的值:
凭据 | 描述 | 示例 |
---|---|---|
host |
源连接到的SugarCRM API端点。 | developer.salesfusion.com |
username |
您的SugarCRM开发人员帐户用户名。 | abc.def@example.com@sugarmarketdemo000.com |
password |
您的SugarCRM开发人员帐户密码。 | 123456789 |
下面概述了进行身份验证所需的步骤 SugarCRM 创建源连接,然后创建数据流以将您的帐户和联系人数据引入Experience Platform。
基本连接会保留您的源和平台之间的信息,包括源的身份验证凭据、连接的当前状态以及唯一的基本连接ID。 基本连接ID允许您浏览和浏览源中的文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。
POST要创建基本连接ID,请向 /connections
端点,同时提供 SugarCRM Accounts & Contacts 作为请求正文一部分的身份验证凭据。
API格式
POST /connections
请求
以下请求为创建基本连接 SugarCRM Accounts & Contacts:
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: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "SugarCRM Accounts & Contacts base connection",
"description": "Create a live inbound connection to your SugarCRM Accounts & Contacts instance, to ingest both historic and scheduled data into Experience Platform",
"connectionSpec": {
"id": "59a4b493-a615-40f9-bd38-f823d0909a2b",
"version": "1.0"
},
"auth": {
"specName": "OAuth2 Refresh Code",
"params": {
"host": "developer.salesfusion.com",
"username": "{SUGARCRM_DEVELOPER_ACCOUNT_USERNAME}",
"password": "{SUGARCRM_DEVELOPER_ACCOUNT_PASSWORD}"
}
}
}'
属性 | 描述 |
---|---|
name |
基础连接的名称。 确保基本连接的名称是描述性的,因为您可以使用此名称查找有关基本连接的信息。 |
description |
可包含的可选值,用于提供有关基本连接的更多信息。 |
connectionSpec.id |
源的连接规范ID。 在您的源注册并批准后,可通过以下方式检索此ID: Flow Service API。 |
auth.specName |
用于向Platform验证源的身份验证类型。 |
auth.params.host |
SugarCRM API主机: developer.salesfusion.com |
auth.params.username |
您的SugarCRM开发人员帐户用户名。 |
auth.params.password |
您的SugarCRM开发人员帐户密码。 |
响应
成功的响应会返回新创建的基本连接,包括其唯一连接标识符(id
)。 在下一步中浏览源的文件结构和内容时,需要此ID。
{
"id": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
"etag": "\"4d08164f-0000-0200-0000-6368b7bf0000\""
}
使用在上一步中生成的基本连接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} |
只有在查看特定目录时才需要此参数。 其值表示您希望浏览的目录的路径。 对于此源,值将为 json . |
fileType=json |
您要带到Platform的文件类型。 目前, json 是唯一支持的文件类型。 |
{PREVIEW} |
一个布尔值,定义连接的内容是否支持预览。 |
{SOURCE_PARAMS} |
为要带到Platform的源文件定义参数。 检索接受的格式类型 {SOURCE_PARAMS} 中,您必须以base64为单位编码整个字符串。 SugarCRM Accounts & Contacts 支持多个API。 根据您要使用的对象类型,传递以下任一项:
|
此 SugarCRM Accounts & Contacts 支持多个API。 根据您利用请求发送的对象类型,如下所示:
请求
对象 SugarCRM 帐户API的值 {SOURCE_PARAMS}
传递为 {"object_type":"accounts"}
. 在base64中进行编码时,它等于 eyJvYmplY3RfdHlwZSI6ImFjY291bnRzIn0=
如下所示。
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/f5421911-6f6c-41c7-aafa-5d9d2ce51535/explore?objectType=rest&object=json&fileType=json&preview=true&sourceParams=eyJvYmplY3RfdHlwZSI6ImFjY291bnRzIn0=' \
-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}'
对象 SugarCRM Contacts API的值 {SOURCE_PARAMS}
传递为 {"object_type":"contacts"}
. 在base64中编码时,它等于 eyJvYmplY3RfdHlwZSI6ImNvbnRhY3RzIn0=
如下所示。
curl -X GET \
'https://platform.adobe.io/data/foundation/flowservice/connections/f5421911-6f6c-41c7-aafa-5d9d2ce51535/explore?objectType=rest&object=json&fileType=json&preview=true&sourceParams=eyJvYmplY3RfdHlwZSI6ImNvbnRhY3RzIn0=' \
-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}'
响应
同样,根据您利用收到的响应的对象类型,如下所示:
一些记录已被截断,以便更好地呈现。
成功的响应会返回如下结构。
{
"format": "hierarchical",
"schema": {
"type": "object",
"properties": {
"next": {
"type": "string"
},
"page_number": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"previous": {},
"total_count": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"count": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"results": {
"type": "object",
"properties": {
"owner": {
"type": "string"
},
"key_account": {
"type": "boolean"
},
"owner_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"custom_score_field": {
"type": "string"
},
"created_by": {
"type": "string"
},
"billing_city": {
"type": "string"
},
"account_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"phone": {
"type": "string"
},
"account_name": {
"type": "string"
},
"updated_by": {
"type": "string"
},
"updated_by_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"created_date": {
"type": "string"
},
"updated_date": {
"type": "string"
},
"created_by_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"account_score": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"account": {
"type": "string"
},
"contacts": {
"type": "string"
}
}
},
"page_size": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
}
}
},
"data": [
{
"next": "https://developer.salesfusion.com/api/2.0/accounts/?date_field=updated_date&page=2",
"page_number": 1,
"total_count": 101148,
"count": 101148,
"results": {
"account_id": 1,
"account": "https://developer.salesfusion.com/api/2.0/accounts/1/",
"account_name": "No Company",
"owner_id": 1,
"owner": "https://developer.salesfusion.com/api/2.0/users/1/",
"created_date": "2022-06-22T23:35:00Z",
"created_by": "https://developer.salesfusion.com/api/2.0/users/1/",
"updated_date": "2019-08-29T15:18:00Z",
"updated_by": "https://developer.salesfusion.com/api/2.0/users/1/",
"contacts": "https://developer.salesfusion.com/api/2.0/accounts/1/contacts/",
"created_by_id": 1,
"updated_by_id": 1,
"custom_score_field": "0",
"account_score": 0,
"key_account": false
},
"page_size": 100
},
{
"next": "https://developer.salesfusion.com/api/2.0/accounts/?date_field=updated_date&page=2",
"page_number": 1,
"total_count": 101148,
"count": 101148,
"results": {
"account_id": 2,
"account": "https://developer.salesfusion.com/api/2.0/accounts/2/",
"account_name": "360 Vacations",
"owner_id": 45,
"owner": "https://developer.salesfusion.com/api/2.0/users/45/",
"phone": "+1 - 384 - 735 - 3844",
"created_date": "2022-09-22T23:35:00Z",
"created_by": "https://developer.salesfusion.com/api/2.0/users/45/",
"updated_date": "2022-02-03T21:55:00Z",
"updated_by": "https://developer.salesfusion.com/api/2.0/users/45/",
"billing_city": "New York City",
"contacts": "https://developer.salesfusion.com/api/2.0/accounts/2/contacts/",
"created_by_id": 45,
"updated_by_id": 45,
"custom_score_field": "0",
"account_score": 0,
"key_account": false
},
"page_size": 100
},
{
"next": "https://developer.salesfusion.com/api/2.0/accounts/?date_field=updated_date&page=2",
"page_number": 1,
"total_count": 101148,
"count": 101148,
"results": {
"account_id": 50,
"account": "https://developer.salesfusion.com/api/2.0/accounts/50/",
"account_name": "Waverly Trading House",
"owner_id": 40,
"owner": "https://developer.salesfusion.com/api/2.0/users/40/",
"phone": "+1 - 964 - 226 - 4552",
"created_date": "2022-09-18T23:35:00Z",
"created_by": "https://developer.salesfusion.com/api/2.0/users/40/",
"updated_date": "2022-02-03T21:55:00Z",
"updated_by": "https://developer.salesfusion.com/api/2.0/users/40/",
"billing_city": "Minneapolis",
"contacts": "https://developer.salesfusion.com/api/2.0/accounts/50/contacts/",
"created_by_id": 40,
"updated_by_id": 40,
"custom_score_field": "0",
"account_score": 0,
"key_account": false
},
"page_size": 100
}
]
}
{
"format": "hierarchical",
"schema": {
"type": "object",
"properties": {
"next": {
"type": "string"
},
"page_number": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"previous": {},
"total_count": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"count": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"results": {
"type": "object",
"properties": {
"opt_out": {
"type": "string"
},
"custom_score_field": {
"type": "string"
},
"contact_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"title": {
"type": "string"
},
"deleted_date": {},
"contact": {
"type": "string"
},
"account_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"del_date": {},
"email": {
"type": "string"
},
"delivered_date": {},
"owner": {
"type": "string"
},
"owner_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"created_by": {
"type": "string"
},
"account_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"opt_out_date": {},
"phone": {
"type": "string"
},
"crm_id": {
"type": "string"
},
"crm_type": {
"type": "string"
},
"updated_by": {
"type": "string"
},
"updated_by_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"deliverability_status": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"deliverability_message": {},
"created_date": {
"type": "string"
},
"updated_date": {
"type": "string"
},
"created_by_id": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
},
"account": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"page_size": {
"type": "integer",
"minimum": -9007199254740992,
"maximum": 9007199254740991
}
}
},
"data": [
{
"next": "https://developer.salesfusion.com/api/2.0/contacts/?date_field=updated_date&page=2",
"page_number": 1,
"total_count": 135704,
"count": 135704,
"results": {
"contact_id": 1,
"contact": "https://developer.salesfusion.com/api/2.0/contacts/1/",
"first_name": "Cynthia",
"last_name": "Rose",
"phone": "+1 - 000 - 000 - 000",
"email": "test.user@hotmail.com",
"account_id": 10,
"account_name": "Sunyvale Reporting Ltd",
"account": "https://developer.salesfusion.com/api/2.0/accounts/10/",
"owner_name": "Sarah Smith",
"owner": "https://developer.salesfusion.com/api/2.0/users/41/",
"created_date": "2022-06-23T23:35:00Z",
"created_by": "https://developer.salesfusion.com/api/2.0/users/41/",
"updated_date": "2022-02-03T21:55:00Z",
"updated_by": "https://developer.salesfusion.com/api/2.0/users/41/",
"created_by_id": 41,
"updated_by_id": 41,
"crm_id": "f53c3982-84ea-11ec-874a-06a1e215b98e",
"opt_out": "N",
"crm_type": "Lead",
"status": "Assigned",
"title": "Director Operations",
"custom_score_field": "0",
"deliverability_status": 0
},
"page_size": 100
},
{
"next": "https://developer.salesfusion.com/api/2.0/contacts/?date_field=updated_date&page=2",
"page_number": 1,
"total_count": 135704,
"count": 135704,
"results": {
"contact_id": 2,
"contact": "https://developer.salesfusion.com/api/2.0/contacts/2/",
"email": "test.user@outlook.com",
"created_date": "2022-06-21T23:35:00Z",
"updated_date": "2022-02-03T21:55:00Z",
"opt_out": "N",
"crm_type": "Contact",
"deliverability_status": 0
},
"page_size": 100
},
{
"next": "https://developer.salesfusion.com/api/2.0/contacts/?date_field=updated_date&page=2",
"page_number": 1,
"total_count": 135704,
"count": 135704,
"results": {
"contact_id": 3,
"contact": "https://developer.salesfusion.com/api/2.0/contacts/3/",
"first_name": "Jonathan",
"last_name": "Ryan",
"phone": "+1 - 000 - 000 - 0000",
"email": "test.user@yahoo.com",
"account_id": 52,
"account_name": "Q3 ARVRO III PR",
"account": "https://developer.salesfusion.com/api/2.0/accounts/52/",
"owner_name": "Max Jensen",
"owner": "https://developer.salesfusion.com/api/2.0/users/45/",
"created_date": "2022-07-02T23:35:00Z",
"created_by": "https://developer.salesfusion.com/api/2.0/users/45/",
"updated_date": "2022-02-03T21:55:00Z",
"updated_by": "https://developer.salesfusion.com/api/2.0/users/45/",
"created_by_id": 45,
"updated_by_id": 45,
"crm_id": "f54a1840-84ea-11ec-9546-06a1e215b98e",
"opt_out": "N",
"crm_type": "Lead",
"status": "New",
"title": "Director Sales",
"custom_score_field": "0",
"deliverability_status": 0
},
"page_size": 100
]
}
您可以通过向以下对象发出POST请求来创建源连接: Flow Service API。 源连接由连接ID、源数据文件的路径以及连接规范ID组成。
API格式
POST /sourceConnections
请求
以下请求为创建源连接 SugarCRM Accounts & Contacts:
根据您使用的对象类型,从以下选项卡中选择:
对象 SugarCRM 帐户API object_type
属性值应为 accounts
.
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: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "SugarCRM Source Connection",
"description": "SugarCRM Source Connection",
"baseConnectionId": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
"connectionSpec": {
"id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
"version": "1.0"
},
"data": {
"format": "json"
},
"params": {
"object_type": "accounts",
"path": "accounts"
}
}'
对象 SugarCRM 联系人API object_type
属性值应为 contacts
.
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: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "SugarCRM Source Connection",
"description": "SugarCRM Source Connection",
"baseConnectionId": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
"connectionSpec": {
"id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
"version": "1.0"
},
"data": {
"format": "json"
},
"params": {
"object_type": "contacts",
"path": "contacts"
}
}'
属性 | 描述 |
---|---|
name |
源连接的名称。 请确保源连接的名称是描述性的,因为您可以使用此名称查找有关源连接的信息。 |
description |
可包含的可选值,用于提供有关源连接的更多信息。 |
baseConnectionId |
的基本连接ID SugarCRM Accounts & Contacts. 此ID是在前面的步骤中生成的。 |
connectionSpec.id |
与源对应的连接规范ID。 |
data.format |
的格式 SugarCRM Accounts & Contacts 要摄取的数据。 目前,唯一支持的数据格式为 json . |
object_type |
SugarCRM Accounts & Contacts 支持多个API。 根据您要使用的对象类型,传递以下任一项:
|
path |
这将具有与您选择的相同的值 object_type . |
响应
成功的响应将返回唯一标识符(id
)。 此ID是稍后步骤创建数据流所必需的。
{
"id": "8f1fc72a-f562-4a1d-8597-85b5ca1b1cd3",
"etag": "\"ed05f1e1-0000-0200-0000-6368b8710000\""
}
为了在Platform中使用源数据,必须创建目标架构,以根据您的需求构建源数据。 然后,使用目标架构创建包含源数据的Platform数据集。
可以通过向以下对象执行POST请求来创建目标XDM架构 架构注册表API.
有关如何创建目标XDM架构的详细步骤,请参阅关于的教程 使用API创建架构.
可以通过向执行POST请求来创建目标数据集 目录服务API,在有效负载中提供目标架构的ID。
有关如何创建目标数据集的详细步骤,请参阅关于的教程 使用API创建数据集.
目标连接表示与要存储所摄取数据的目标的连接。 要创建目标连接,您必须提供对应于数据湖的固定连接规范ID。 此ID为: c604ff05-7f1a-43c0-8e18-33bf874cb11c
.
现在,您拥有目标架构、目标数据集以及到数据湖的连接规范ID。 使用这些标识符,您可以使用 Flow Service 用于指定将包含入站源数据的数据集的API。
API格式
POST /targetConnections
请求
以下请求创建目标连接 SugarCRM Accounts & Contacts:
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: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "SugarCRM Target Connection Generic Rest",
"description": "SugarCRM Target Connection Generic Rest",
"connectionSpec": {
"id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
"version": "1.0"
},
"data": {
"format": "parquet_xdm",
"schema": {
"id": "https://ns.adobe.com/{TENANT_ID}/schemas/b156e6f818f923e048199173c45e55e20fd2487f5eb03d22",
"version": "1.22"
}
},
"params": {
"dataSetId": "6365389d1d37d01c077a81da"
}
}'
属性 | 描述 |
---|---|
name |
目标连接的名称。 确保目标连接的名称是描述性的,因为您可以使用此名称查找有关目标连接的信息。 |
description |
可包含的可选值,用于提供有关目标连接的更多信息。 |
connectionSpec.id |
对应于数据湖的连接规范ID。 此固定ID为: 6b137bf6-d2a0-48c8-914b-d50f4942eb85 . |
data.format |
的格式 SugarCRM Accounts & Contacts 要摄取的数据。 |
params.dataSetId |
在上一步中检索到的目标数据集ID。 |
响应
成功的响应将返回新目标连接的唯一标识符(id
)。 此ID在后续步骤中是必需的。
{
"id": "6b137bf6-d2a0-48c8-914b-d50f4942eb85",
"etag": "\"8405a268-0000-0200-0000-6368b8c30000\""
}
要将源数据摄取到目标数据集中,必须首先将其映射到目标数据集所遵循的目标架构。 这可以通过向以下对象执行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: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"outputSchema": {
"schemaRef": {
"id": "https://ns.adobe.com/{TENANT_ID}/schemas/b156e6f818f923e048199173c45e55e20fd2487f5eb03d22",
"contentType": "application/vnd.adobe.xed-full+json;version=1"
}
},
"mappings": [
{
"sourceType": "ATTRIBUTE",
"source": "results.account",
"destination": "_extconndev.account"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.account_id",
"destination": "_extconndev.account_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.acount_name",
"destination": "_extconndev.account_name"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.account_score",
"destination": "_extconndev.account_score"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.billing_city",
"destination": "_extconndev.billing_city"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.contacts",
"destination": "_extconndev.contacts"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.created_by",
"destination": "_extconndev.created_by"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.created_by_id",
"destination": "_extconndev.created_by_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.created_date",
"destination": "_extconndev.created_date"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.custom_score_field",
"destination": "_extconndev.custom_score_field"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.key_account",
"destination": "_extconndev.key_account"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.owner",
"destination": "_extconndev.owner"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.owner_id",
"destination": "_extconndev.owner_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.phone",
"destination": "_extconndev.phone_no"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.updated_by",
"destination": "_extconndev.updated_by"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.updated_by_id",
"destination": "_extconndev.updated_by_id"
},
{
"sourceType": "ATTRIBUTE",
"source": "results.updated_date",
"destination": "_extconndev.updated_date"
}
]
}'
属性 | 描述 |
---|---|
outputSchema.schemaRef.id |
的ID 目标XDM架构 在之前的步骤中生成。 |
mappings.sourceType |
正在映射的源属性类型。 |
mappings.source |
需要映射到目标XDM路径的源属性。 |
mappings.destination |
源属性将映射到的目标XDM路径。 |
响应
成功响应将返回新创建映射的详细信息,包括其唯一标识符(id
)。 在后续步骤中需要使用此值来创建数据流。
{
"id": "059c69f7207b4d7e9b48c47e2fd966a6",
"version": 0,
"createdDate": 1597784069368,
"modifiedDate": 1597784069368,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}"
}
从以下来源获取数据的最后一步 SugarCRM Accounts & Contacts 到Platform就是创建数据流。 现在,您已准备以下必需值:
数据流负责从源中计划和收集数据。 您可以通过在有效负载中提供上述值时执行POST请求来创建数据流。
要计划摄取,您必须先将开始时间值设置为纪元时间(以秒为单位)。 然后,必须将频率值设置为以下之一 hour
或 day
. 间隔值用于指定两次连续摄取之间的周期。 间隔值应设置为 1
或 24
根据 scheduleParams.frequency
选择任一 hour
或 day
.
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: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"name": "SugarCRM Connector Description Flow Generic Rest",
"description": "SugarCRM Connector Description Flow Generic Rest",
"flowSpec": {
"id": "6499120c-0b15-42dc-936e-847ea3c24d72",
"version": "1.0"
},
"sourceConnectionIds": [
"8f1fc72a-f562-4a1d-8597-85b5ca1b1cd3"
],
"targetConnectionIds": [
"6b137bf6-d2a0-48c8-914b-d50f4942eb85"
],
"transformations": [
{
"name": "Mapping",
"params": {
"mappingId": "059c69f7207b4d7e9b48c47e2fd966a6",
"mappingVersion": "0"
}
}
],
"scheduleParams": {
"startTime": "1625040887",
"frequency": "hour",
"interval": 1
}
}'
属性 | 描述 |
---|---|
name |
您的数据流的名称。 确保数据流的名称是描述性的,因为您可以使用此名称查找数据流上的信息。 |
description |
可包含的可选值,用于提供有关数据流的更多信息。 |
flowSpec.id |
创建数据流所需的流规范ID。 此固定ID为: 6499120c-0b15-42dc-936e-847ea3c24d72 . |
flowSpec.version |
流规范ID的相应版本。 此值默认为 1.0 . |
sourceConnectionIds |
此 源连接ID 在之前的步骤中生成。 |
targetConnectionIds |
此 目标连接Id 在之前的步骤中生成。 |
transformations |
此属性包含需要应用于数据的各种转换。 将不符合XDM的数据引入到Platform时需要此属性。 |
transformations.name |
分配给转换的名称。 |
transformations.params.mappingId |
此 映射ID 在之前的步骤中生成。 |
transformations.params.mappingVersion |
映射ID的相应版本。 此值默认为 0 . |
scheduleParams.startTime |
此属性包含有关数据流的摄取计划的信息。 |
scheduleParams.frequency |
数据流收集数据的频率。 可接受的值包括: hour 或 day . |
scheduleParams.interval |
间隔指定两次连续流运行之间的周期。 间隔的值应为非零整数。 间隔值应设置为 1 或 24 根据 scheduleParams.frequency 选择任一 hour 或 day . |
响应
成功的响应会返回ID (id
)。 您可以使用此ID监视、更新或删除数据流。
{
"id": "fcd16140-81b4-422a-8f9a-eaa92796c4f4",
"etag": "\"9200a171-0000-0200-0000-6368c1da0000\""
}
以下部分提供了有关监视、更新和删除数据流的步骤的信息。
创建数据流后,您可以监视通过它摄取的数据,以查看有关流运行、完成状态和错误的信息。 有关完整的API示例,请阅读以下指南: 使用API监控源数据流.
通过向发出PATCH请求,更新数据流的详细信息,例如其名称和描述,以及其运行计划和关联的映射集。 /flows
端点 Flow Service API,同时提供数据流的ID。 发出PATCH请求时,必须提供数据流的唯一值 etag
在 If-Match
标题。 有关完整的API示例,请阅读以下指南: 使用API更新源数据流
PATCH通过向 Flow Service API,同时将您的基本连接ID作为查询参数提供。 发出PATCH请求时,必须提供源帐户的唯一帐户 etag
在 If-Match
标题。 有关完整的API示例,请阅读以下指南: 使用API更新源帐户.
通过向以下对象执行DELETE请求来删除您的数据流: Flow Service API,同时提供您要作为查询参数的一部分删除的数据流的ID。 有关完整的API示例,请阅读以下指南: 使用API删除数据流.
向以下网站发出DELETE请求,删除您的帐户: Flow Service API,同时提供要删除帐户的基本连接ID。 有关完整的API示例,请阅读以下指南: 使用API删除源帐户.