Beta 版
使用流服务API为SAP Commerce创建源连接和数据流
创建对象:
- 开发人员
以下教程将指导您完成创建SAP Commerce源连接和数据流的步骤,以便使用Flow Service API将SAP 订阅账单联系人和客户数据引入Adobe Experience Platform。
快速入门
本指南要求您对Experience Platform的以下组件有一定的了解:
以下部分提供使用Flow Service API成功连接到SAP Commerce所需了解的其他信息。
收集所需的凭据
为了将SAP Commerce连接到Experience Platform,您必须提供以下连接属性的值:
凭据 | 描述 |
---|---|
clientId | 服务键中clientId 的值。 |
clientSecret | 服务键中clientSecret 的值。 |
tokenEndpoint | 服务键中url 的值,它将类似于https://subscriptionbilling.authentication.eu10.hana.ondemand.com 。 |
region | 您的数据中心位置。 该区域存在于url 中,其值类似于eu10 或us10 。 例如,如果url 是https://subscriptionbilling.authentication.eu10.hana.ondemand.com ,则您将需要eu10 。 |
有关这些凭据的更多信息,请参阅SAP Commerce 文档。
使用Flow Service API将SAP Commerce连接到Experience Platform
下面概述了验证SAP Commerce源、创建源连接以及创建数据流以将您的帐户和联系人数据传送到Experience Platform时需要执行的步骤。
创建基本连接
基本连接会保留源与Experience Platform之间的信息,包括源的身份验证凭据、连接的当前状态以及唯一的基本连接ID。 基本连接ID允许您浏览和浏览源中的文件,并标识要摄取的特定项目,包括有关其数据类型和格式的信息。
要创建基本连接ID,请在提供您的SAP Commerce身份验证凭据作为请求正文的一部分时,向/connections
端点发出POST请求。
API格式
POST /connections
请求
以下请求为SAP Commerce创建基本连接:
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": "SAP Commerce base connection",
"description": "Authenticated base connection for SAP Commerce",
"connectionSpec": {
"id": "d8ee38de-7ae9-4058-9610-c79ce75f8e92",
"version": "1.0"
},
"auth": {
"specName": "OAuth2 Client Credential",
"params": {
"region": "{REGION}",
"clientId": "{CLIENT_ID}",
"clientSecret": "{CLIENT_SECRET}"
"tokenEndpoint": "{TOKEN_ENDPOINT}"
}
}
}'
name
description
connectionSpec.id
auth.specName
auth.params.region
url
中,其值类似于eu10
或us10
。 例如,如果url
是https://subscriptionbilling.authentication.eu10.hana.ondemand.com
,您将需要eu10
。auth.params.clientId
clientId
的值。auth.params.clientSecret
clientSecret
的值。auth.params.tokenEndpoint
url
的值,它将类似于https://subscriptionbilling.authentication.eu10.hana.ondemand.com
。响应
成功的响应返回新创建的基本连接,包括其唯一连接标识符(id
)。 在下一步中浏览源的文件结构和内容时,需要此ID。
{
"id": "5f6d6022-3f64-400c-ba01-d4010de2d8ff",
"etag": "\"f8018de1-0000-0200-0000-6482d7210000\""
}
浏览您的源
获得基本连接ID后,您现在可以通过对/connections
端点执行GET请求来探索源数据的内容和结构,同时将基本连接ID作为查询参数提供。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=rest&object={OBJECT}&fileType={FILE_TYPE}&preview={PREVIEW}&sourceParams={SOURCE_PARAMS}
执行GET请求以浏览源的文件结构和内容时,必须包括下表列出的查询参数:
{BASE_CONNECTION_ID}
objectType=rest
rest
。{OBJECT}
json
。fileType=json
json
是唯一支持的文件类型。{PREVIEW}
{SOURCE_PARAMS}
为要带到Experience Platform的源文件定义参数。 要检索{SOURCE_PARAMS}
的已接受格式类型,必须在base64中编码整个字符串。
SAP Commerce支持多个API。 根据您要使用的对象类型,传递以下任一项:
customers
contacts
SAP Commerce源支持多个API。 根据您利用请求发送的对象类型,如下所示:
对于SAP Commerce客户API,{SOURCE_PARAMS}
的值作为{"object_type":"customers"}
传递。 在base64中进行编码时,它等于eyJvYmplY3RfdHlwZSI6ImN1c3RvbWVycyJ9
,如下所示。
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=eyJvYmplY3RfdHlwZSI6ImN1c3RvbWVycyJ9' \
-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}'
成功的响应会返回类似于以下内容的JSON结构:
{
"format": "hierarchical",
"schema": {
"type": "object",
"properties": {
"personalInfo": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
}
}
},
"addresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"isDefault": {
"type": "boolean"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"addressUUID": {
"type": "string"
},
"houseNumber": {
"type": "string"
},
"additionalAddressInfo": {
"type": "string"
},
"state": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"customerNumber": {
"type": "string"
},
"corporateInfo": {
"type": "object",
"properties": {}
},
"customReferences": {
"type": "array",
"items": {
"type": "object",
"properties": {}
}
},
"externalObjectReferences": {
"type": "array",
"items": {
"type": "object",
"properties": {
"externalSystemId": {
"type": "string"
},
"externalId": {
"type": "string"
},
"externalIdTypeCode": {
"type": "string"
}
}
}
},
"createdAt": {
"type": "string"
},
"customerType": {
"type": "string"
},
"markets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"salesArea": {
"type": "object",
"properties": {
"division": {
"type": "string"
},
"distributionChannel": {
"type": "string"
},
"salesOrganization": {
"type": "string"
}
}
},
"priceType": {
"type": "string"
},
"active": {
"type": "boolean"
},
"currency": {
"type": "string"
},
"marketId": {
"type": "string"
}
}
}
},
"createdBy": {
"type": "string"
},
"changedBy": {
"type": "string"
},
"changedAt": {
"type": "string"
},
"defaultAddress": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"isDefault": {
"type": "boolean"
},
"phone": {
"type": "string"
},
"city": {
"type": "string"
},
"street": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"addressUUID": {
"type": "string"
},
"houseNumber": {
"type": "string"
},
"additionalAddressInfo": {
"type": "string"
},
"state": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}
},
"data": [
{
"personalInfo": {
"firstName": "Test 1",
"lastName": "User 1"
},
"addresses": [
{
"email": "user1@test.com",
"phone": "123456890",
"houseNumber": "123",
"city": "New Orleans",
"state": "LA",
"postalCode": "700089",
"country": "US",
"addressUUID": "ff871221-ab48-435c-b1f5-903db1c3cea2",
"isDefault": true
}
],
"customerNumber": "2863620303",
"externalObjectReferences": [
{
"externalSystemId": "t090000",
"externalId": "1324566",
"externalIdTypeCode": "201"
}
],
"createdAt": "2023-05-31T06:39:28.499Z",
"customerType": "INDIVIDUAL",
"markets": [
{
"marketId": "US",
"active": true,
"currency": "USD",
"country": "US",
"salesArea": {
"salesOrganization": "SE10",
"distributionChannel": "00",
"division": "00"
},
"priceType": "Net"
}
],
"createdBy": "sb-subscription-billing!b123456|revenue-cloud!b1234",
"changedBy": "sb-subscription-billing!b123456|revenue-cloud!b1234",
"changedAt": "2023-05-31T06:39:28.499Z",
"defaultAddress": {
"email": "user1@test.com",
"phone": "123456890",
"houseNumber": "123",
"city": "New Orleans",
"state": "LA",
"postalCode": "700089",
"country": "US",
"addressUUID": "ff871221-ab48-435c-b1f5-903db1c3cea2",
"isDefault": true
}
},
{
"personalInfo": {
"firstName": "Test 2",
"lastName": "User 2"
},
"addresses": [
{
"email": "user2@test.com",
"phone": "1234567899",
"houseNumber": "876",
"city": "New Orleans",
"state": "LA",
"postalCode": "700089",
"country": "US",
"addressUUID": "1cd039aa-5b86-4e46-8e37-9ef263332c6b",
"isDefault": true
}
],
"customerNumber": "6776445404",
"externalObjectReferences": [
{
"externalSystemId": "t089999",
"externalId": "1324565",
"externalIdTypeCode": "201"
}
],
"createdAt": "2023-05-31T06:39:28.142Z",
"customerType": "INDIVIDUAL",
"markets": [
{
"marketId": "US",
"active": true,
"currency": "USD",
"country": "US",
"salesArea": {
"salesOrganization": "SE10",
"distributionChannel": "00",
"division": "00"
},
"priceType": "Net"
}
],
"createdBy": "sb-subscription-billing!b123456|revenue-cloud!b12345",
"changedBy": "sb-subscription-billing!b123456|revenue-cloud!b12345",
"changedAt": "2023-05-31T06:39:28.142Z",
"defaultAddress": {
"email": "user2@test.com",
"phone": "1234567899",
"houseNumber": "876",
"city": "New Orleans",
"state": "LA",
"postalCode": "700089",
"country": "US",
"addressUUID": "1cd039aa-5b86-4e46-8e37-9ef263332c6b",
"isDefault": true
}
}
]
}
对于SAP Commerce联系人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}'
成功的响应会返回类似于以下内容的JSON结构:
{
"format": "hierarchical",
"schema": {
"type": "object",
"properties": {
"externalObjectReferences": {
"type": "array",
"items": {
"type": "object",
"properties": {}
}
},
"personalInfo": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
}
}
},
"createdAt": {
"type": "string"
},
"createdBy": {
"type": "string"
},
"changedBy": {
"type": "string"
},
"contactNumber": {
"type": "string"
},
"changedAt": {
"type": "string"
}
}
},
"data": [
{
"personalInfo": {
"firstName": "Test 1",
"lastName": "User 1"
},
"createdAt": "2023-05-31T13:33:52.689Z",
"createdBy": "sb-subscription-billing!b123456|revenue-cloud!b1234",
"changedBy": "sb-subscription-billing!b123456|revenue-cloud!b1234",
"contactNumber": "4365374130",
"changedAt": "2023-05-31T13:33:52.689Z"
},
{
"personalInfo": {
"firstName": "Test 2",
"lastName": "User 2"
},
"createdAt": "2023-05-31T13:33:52.37Z",
"createdBy": "sb-subscription-billing!b123456|revenue-cloud!b1234",
"changedBy": "sb-subscription-billing!b123456|revenue-cloud!b1234",
"contactNumber": "4075431868",
"changedAt": "2023-05-31T13:33:52.37Z"
}
]
}
创建源连接
您可以通过向Flow Service API的/sourceConnections
端点发出POST请求来创建源连接。 源连接由连接ID、源数据文件的路径以及连接规范ID组成。
API格式
POST /sourceConnections
根据您使用的对象类型,从以下选项卡中选择:
以下请求为SAP Commerce客户数据创建源连接:
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": "SAP Commerce Source Connection",
"description": "SAP Commerce Source Connection",
"baseConnectionId": "f5421911-6f6c-41c7-aafa-5d9d2ce51535",
"connectionSpec": {
"id": "63d2b27b-69a5-45c9-a7fe-78148a25de3c",
"version": "1.0"
},
"data": {
"format": "json"
},
"params": {
"object_type": "customers"
}
}'
name
description
baseConnectionId
connectionSpec.id
data.format
json
。object_type
object_type
参数应设置为customers
。path
object_type
选择的相同的值。成功的响应返回新创建的源连接的唯一标识符(id
)。 此ID是稍后步骤创建数据流所必需的。
{
"id": "8f1fc72a-f562-4a1d-8597-85b5ca1b1cd3",
"etag": "\"ed05f1e1-0000-0200-0000-6368b8710000\""
}
以下请求为SAP Commerce联系人数据创建源连接:
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": "SAP Commerce Source Connection",
"description": "SAP Commerce 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"
}
}'
name
description
baseConnectionId
connectionSpec.id
data.format
json
。object_type
object_type
参数应设置为contacts
。path
object_type
选择的相同的值。成功的响应返回新创建的源连接的唯一标识符(id
)。 此ID是稍后步骤创建数据流所必需的。
{
"id": "8f1fc72a-f562-4a1d-8597-85b5ca1b1cd3",
"etag": "\"ed05f1e1-0000-0200-0000-6368b8710000\""
}
创建目标XDM架构
为了在Experience Platform中使用源数据,必须创建目标架构,以根据您的需求构建源数据。 然后,使用目标架构创建包含源数据的Experience Platform数据集。
通过对架构注册表API执行POST请求,可以创建目标XDM架构。
有关如何创建目标XDM架构的详细步骤,请参阅有关使用API 创建架构的教程。
创建目标数据集
通过向目录服务API执行POST请求,在有效负载中提供目标架构的ID,可以创建目标数据集。
有关如何创建目标数据集的详细步骤,请参阅有关使用API创建数据集的教程。
创建目标连接
目标连接表示与要存储所摄取数据的目标的连接。 要创建目标连接,您必须提供对应于数据湖的固定连接规范ID。 此ID为: c604ff05-7f1a-43c0-8e18-33bf874cb11c
。
现在,您拥有目标架构、目标数据集以及到数据湖的连接规范ID。 使用这些标识符,您可以使用Flow Service API创建目标连接,以指定将包含入站源数据的数据集。
API格式
POST /targetConnections
请求
以下请求为SAP Commerce创建目标连接:
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": "SAP Commerce Target Connection Generic Rest",
"description": "SAP Commerce Target Connection Generic Rest",
"connectionSpec": {
"id": "c604ff05-7f1a-43c0-8e18-33bf874cb11c",
"version": "1.0"
},
"data": {
"format": "parquet_xdm",
"schema": {
"id": "https://ns.adobe.com/{TENANT_ID}/schemas/325fd5394ba421246b05c0a3c2cd5efeec2131058a63d473",
"version": "1.2"
}
},
"params": {
"dataSetId": "645923cd7aeeea1c06c5e92e"
}
}'
name
description
connectionSpec.id
6b137bf6-d2a0-48c8-914b-d50f4942eb85
。data.format
params.dataSetId
响应
成功的响应返回新目标连接的唯一标识符(id
)。 此ID在后续步骤中是必需的。
{
"id": "5b72a4b6-2fb8-4ca7-8ad8-4114a3063c5c",
"etag": "\"db00c6dc-0000-0200-0000-6482d8280000\""
}
POST /conversion/mappingSets
以下请求为SAP Commerce客户API数据创建映射
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": "customerNumber",
"destination": "_extconndev.customerNumber"
},
{
"sourceType": "ATTRIBUTE",
"source": "customerType",
"destination": "_extconndev.customerType"
},
{
"sourceType": "ATTRIBUTE",
"source": "changedAt",
"destination": "_extconndev.changedAt"
},
{
"sourceType": "ATTRIBUTE",
"source": "addresses[*].email",
"destination": "_extconndev.addresses[*].email"
},
{
"sourceType": "ATTRIBUTE",
"source": "addresses[*].city",
"destination": "_extconndev.addresses[*].city"
},
{
"sourceType": "ATTRIBUTE",
"source": "addresses[*].addressUUID",
"destination": "_extconndev.addresses[*].addressUUID"
},
{
"sourceType": "ATTRIBUTE",
"source": "externalObjectReferences[*].externalSystemId",
"destination": "_extconndev.externalObjectReferences[*].externalSystemId"
},
{
"sourceType": "ATTRIBUTE",
"source": "externalObjectReferences[*].externalId",
"destination": "_extconndev.externalObjectReferences[*].externalId"
},
{
"sourceType": "ATTRIBUTE",
"source": "externalObjectReferences[*].externalIdTypeCode",
"destination": "_extconndev.externalObjectReferences[*].externalIdTypeCode"
},
{
"sourceType": "ATTRIBUTE",
"source": "customReferences[*].id",
"destination": "_extconndev.customReferences[*].id"
},
{
"sourceType": "ATTRIBUTE",
"source": "customReferences[*].typeCode",
"destination": "_extconndev.customReferences[*].typeCode"
}
],
"outputSchema": {
"schemaRef": {
"id": "https://ns.adobe.com/{TENANT_ID}/schemas/325fd5394ba421246b05c0a3c2cd5efeec2131058a63d473",
"contentType": "application/vnd.adobe.xed-full+json;version=1"
}
}
}'
outputSchema.schemaRef.id
mappings.sourceType
mappings.source
mappings.destination
成功的响应返回新创建的映射的详细信息,包括其唯一标识符(id
)。 在后续步骤中需要使用此值来创建数据流。
{
"id": "ddf0592bcc9d4ac391803f15f2429f87",
"version": 0,
"createdDate": 1597784069368,
"modifiedDate": 1597784069368,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}"
}
以下请求为SAP Commerce联系人API数据创建映射
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": "contactNumber",
"destination": "_extconndev.contactNumber"
},
{
"sourceType": "ATTRIBUTE",
"source": "createdAt",
"destination": "_extconndev.createdAt"
},
{
"sourceType": "ATTRIBUTE",
"source": "changedAt",
"destination": "_extconndev.changedAt"
},
{
"sourceType": "ATTRIBUTE",
"source": "personalInfo.lastName",
"destination": "_extconndev.personalInfo.lastName"
},
{
"sourceType": "ATTRIBUTE",
"source": "personalInfo.firstName",
"destination": "_extconndev.personalInfo.firstName"
},
{
"sourceType": "ATTRIBUTE",
"source": "externalObjectRefereneces[*].externalSystemId",
"destination": "_extconndev.externalObjectReferences[*].externalSystemId"
},
{
"sourceType": "ATTRIBUTE",
"source": "externalObjectReferences[*].externalId",
"destination": "_extconndev.externalObjectReferences[*].externalId"
},
{
"sourceType": "ATTRIBUTE",
"source": "externalObjectReferences[*].externalIdTypeCode",
"destination": "_extconndev.externalObjectReferences[*].externalIdTypeCode"
}
],
"outputSchema": {
"schemaRef": {
"id": "https://ns.adobe.com/extconndev/schemas/325fd5394ba421246b05c0a3c2cd5efeec2131058a63d473",
"contentType": "application/vnd.adobe.xed-full+json;version=1"
}
}
}'
outputSchema.schemaRef.id
mappings.sourceType
mappings.source
mappings.destination
成功的响应返回新创建的映射的详细信息,包括其唯一标识符(id
)。 在后续步骤中需要使用此值来创建数据流。
{
"id": "ddf0592bcc9d4ac391803f15f2429f87",
"version": 0,
"createdDate": 1597784069368,
"modifiedDate": 1597784069368,
"createdBy": "{CREATED_BY}",
"modifiedBy": "{MODIFIED_BY}"
}
创建流
将数据从SAP Commerce引入Experience Platform的最后一步是创建数据流。 现在,您已准备以下必需值:
数据流负责从源中计划和收集数据。 您可以通过在有效负载中提供前面提到的值时执行POST请求来创建数据流。
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": "SAP Commerce Connector Description Flow Generic Rest",
"description": "SAP Commerce Connector Description Flow Generic Rest",
"flowSpec": {
"id": "6499120c-0b15-42dc-936e-847ea3c24d72",
"version": "1.0"
},
"sourceConnectionIds": [
"2ef2e831-f4f1-4363-a0f7-08b4ea347164"
],
"targetConnectionIds": [
"5b72a4b6-2fb8-4ca7-8ad8-4114a3063c5c"
],
"transformations": [
{
"name": "Mapping",
"params": {
"mappingId": "ddf0592bcc9d4ac391803f15f2429f87",
"mappingVersion": "0"
}
}
],
"scheduleParams": {
"startTime": "1625040887",
"frequency": "once",
}
}'
name
description
flowSpec.id
6499120c-0b15-42dc-936e-847ea3c24d72
。flowSpec.version
1.0
。sourceConnectionIds
targetConnectionIds
transformations
transformations.name
transformations.params.mappingId
transformations.params.mappingVersion
0
。scheduleParams.startTime
scheduleParams.frequency
scheduleParams.interval
响应
成功的响应返回新创建的数据流的ID (id
)。 您可以使用此ID监视、更新或删除数据流。
{
"id": "fcd16140-81b4-422a-8f9a-eaa92796c4f4",
"etag": "\"9200a171-0000-0200-0000-6368c1da0000\""
}
附录
以下部分提供了有关监视、更新和删除数据流的步骤的信息。
监测数据流
创建数据流后,您可以监视通过它摄取的数据,以查看有关流运行、完成状态和错误的信息。 有关完整的API示例,请阅读有关使用API监视源数据流的指南。
更新您的数据流
通过提供数据流的ID,向Flow Service API的/flows
端点发出PATCH请求来更新数据流的详细信息,例如其名称和描述,以及其运行计划和关联的映射集。 发出PATCH请求时,必须在If-Match
标头中提供数据流唯一的etag
。 有关完整的API示例,请阅读有关使用API更新源数据流的指南。
更新您的帐户
在提供基本连接ID作为查询参数的同时,通过向Flow Service API执行PATCH请求来更新源帐户的名称、描述和凭据。 发出PATCH请求时,必须在If-Match
标头中提供源帐户的唯一etag
。 有关完整的API示例,请阅读有关使用API更新源帐户的指南。
删除您的数据流
在查询参数中提供要删除的数据流的ID时,通过向Flow Service API执行DELETE请求来删除数据流。 有关完整的API示例,请阅读有关使用API删除数据流的指南。
删除您的帐户
在提供要删除的帐户的基本连接ID时,通过向Flow Service API执行DELETE请求来删除您的帐户。 有关完整的API示例,请阅读有关使用API🔗删除源帐户的指南。