使用流服务API将受众激活到基于文件的目标
- 主题:
- 目标
创建对象:
- 管理员
- 用户
从Experience Platform导出文件时,使用增强的文件导出功能可访问增强的自定义功能:
- 额外的文件命名选项。
- 可通过改进的映射步骤在您导出的文件中设置自定义文件头。
- 能够选择导出文件的文件类型。
- 能够自定义导出的CSV数据文件的格式。
以下列出的六个云存储卡支持此功能:
本文说明了使用流服务API将符合条件的用户档案从Adobe Experience Platform导出到上面链接的某个云存储位置所需的工作流。
快速入门
本指南要求您对 Adobe Experience Platform 的以下组件有一定了解:
- Experience Data Model (XDM) System: Experience Platform用于组织客户体验数据的标准化框架。
- Segmentation Service: Adobe Experience Platform Segmentation Service允许您根据Real-Time Customer Profile数据在Adobe Experience Platform中构建受众并生成受众。
- Sandboxes: Experience Platform提供了将单个Experience Platform实例划分为多个单独的虚拟环境的虚拟沙箱,以帮助开发和改进数字体验应用程序。
以下部分提供了在Experience Platform中将数据激活到基于文件的目标时需要了解的其他信息。
所需的权限
要导出配置文件,您需要 查看目标、激活目标、查看配置文件 和 查看区段 访问控制权限。 阅读访问控制概述或联系您的产品管理员以获取所需的权限。
要导出 标识,您需要 查看标识图形 访问控制权限。
正在读取示例 API 调用
本教程提供了示例API调用来演示如何格式化请求。 这些包括路径、必需的标头和格式正确的请求负载。还提供了在 API 响应中返回的示例 JSON。有关示例API调用文档中使用的约定的信息,请参阅Experience Platform疑难解答指南中有关如何读取示例API调用的部分。
收集必需标题和可选标题的值
要调用Experience Platform API,您必须先完成Experience Platform身份验证教程。 完成身份验证教程会提供所有 Experience Platform API 调用中每个所需标头的值,如下所示:
- 授权:持有人
{ACCESS_TOKEN}
- x-api-key:
{API_KEY}
- x-gw-ims-org-id:
{ORG_ID}
Experience Platform中的资源可以隔离到特定的虚拟沙箱。 在对Experience Platform API的请求中,您可以指定将在其中执行操作的沙盒的名称和ID。 这些是可选参数。
- x-sandbox-name:
{SANDBOX_NAME}
包含有效负载(POST
、PUT
、PATCH
)的所有请求都需要额外的媒体类型标头:
- 内容类型:
application/json
API参考文档
您可以在本教程中找到所有API操作的随附参考文档。 请参阅Adobe Developer网站🔗上的流服务 — 目标API文档。 我们建议您并行使用此教程和API参考文档。
术语表
有关将在此API教程中遇到的术语的说明,请阅读API参考文档的术语表部分。
选择要从中导出受众的目标
在开始导出用户档案的工作流之前,请确定要将受众导出到的目标的连接规范和流量规范ID。 请参考下表。
4fce964d-3f37-408f-9778-e597338a21ee
1a0514a6-33d4-4c7f-aff8-594799c47549
6d6b59bf-fb58-4107-9064-4d246c0e5bb2
752d422f-b16f-4f0d-b1c6-26e448e3b388
be2c3209-53bc-47e7-ab25-145db8b873e1
17be2013-2549-41ce-96e7-a70363bec293
10440537-2a7b-4583-ac39-ed38d4b848e8
cd2fc47e-e838-4f38-a581-8fff2f99b63a
c5d93acb-ea8b-4b14-8f53-02138444ae99
585c15c4-6cbf-4126-8f87-e26bff78b657
36965a81-b1c6-401b-99f8-22508f1e6a26
fd36aaa4-bf2b-43fb-9387-43785eeeb799
在本教程的后续步骤中,您需要这些ID来构建各种流服务实体。 您还需要引用连接规范本身的某些部分来设置某些实体,以便从流服务API中检索连接规范。 请参阅下面的示例,以了解如何检索表中所有目标的连接规范:
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/4fce964d-3f37-408f-9778-e597338a21ee' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
响应
{
"items": [
{
"id": "4fce964d-3f37-408f-9778-e597338a21ee",
"name": "Amazon S3",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
//...
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/6d6b59bf-fb58-4107-9064-4d246c0e5bb2' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
响应
{
"items": [
{
"id": "6d6b59bf-fb58-4107-9064-4d246c0e5bb2",
"name": "Azure Blob Storage",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
//...
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/be2c3209-53bc-47e7-ab25-145db8b873e1' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
响应
{
"items": [
{
"id": "be2c3209-53bc-47e7-ab25-145db8b873e1",
"name": "Azure Data Lake Gen2",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
//...
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/10440537-2a7b-4583-ac39-ed38d4b848e8' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
响应
{
"items": [
{
"id": "10440537-2a7b-4583-ac39-ed38d4b848e8",
"name": "Data Landing Zone",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
//...
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/c5d93acb-ea8b-4b14-8f53-02138444ae99' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
响应
{
"items": [
{
"id": "c5d93acb-ea8b-4b14-8f53-02138444ae99",
"name": "Google Cloud Storage",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
//...
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/36965a81-b1c6-401b-99f8-22508f1e6a26' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}'
响应
{
"items": [
{
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26",
"name": "SFTP",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
//...
请按照以下步骤设置指向云存储目标的受众导出数据流。 对于某些步骤,不同云存储目标之间的请求和响应会有所不同。 在这些情况下,使用页面上的选项卡可检索特定于要连接并将受众导出到的目标的请求和响应。 请确保为您配置的目标使用正确的connection spec
和flow spec
。
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/sourceConnections' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":"Connect to Profile store",
"description":"Optional",
"connectionSpec":{
"id":"8a9c3494-9708-43d7-ae3f-cda01e5030e1", // this connection spec ID is always the same for Source Connections
"version":"1.0"
}
}'
响应
{
"id": "900df191-b983-45cd-90d5-4c7a0326d650",
"etag": "\"0500ebe1-0000-0200-0000-63e28d060000\""
}
成功的响应返回新创建的源连接的ID (id
)和etag
。 记下源连接ID,因为稍后创建数据流时会需要它。
创建基本连接
基本连接安全地存储到目标的凭据。 根据目标类型,对该目标进行身份验证所需的凭据可能有所不同。 要查找这些身份验证参数,请首先按照选择导出受众的目标一节中所述检索所需目标的connection spec
,然后查看响应的authSpec
。 请引用下面的选项卡,以查看所有受支持目标的authSpec
属性。
请注意下面connection spec示例中带有内联注释的高亮显示行,这些注释提供了有关在connection spec中何处查找身份验证参数的更多信息。
{
"items": [
{
"id": "4fce964d-3f37-408f-9778-e597338a21ee",
"name": "amazon-s3",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [
{
"name": "Access Key",
"type": "KeyBased",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Defines auth params required for connecting to amazon-s3",
"type": "object",
"properties": {
"s3AccessKey": {
"description": "Access key id",
"type": "string",
"pattern": "^[A-Z2-7]{20}$"
},
"s3SecretKey": {
"description": "Secret access key for the user account",
"type": "string",
"format": "password",
"pattern": "^[A-Za-z0-9\\/+]{40}$"
}
},
"required": [
"s3SecretKey",
"s3AccessKey"
]
}
},
{
"name": "Assumed Role",
"type": "S3RoleBased",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Defines role based auth params required for connecting to amazon-s3",
"type": "object",
"properties": {
"s3Role": {
"title": "Role",
"description": "S3 role",
"type": "string",
"format": "password"
}
},
"required": [
"s3Role"
]
}
}
],
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些注释提供了有关在connection spec中何处查找身份验证参数的更多信息。
{
"items": [
{
"id": "6d6b59bf-fb58-4107-9064-4d246c0e5bb2",
"name": "Azure Blob Storage",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [ // describes the authentication parameters
{
"name": "ConnectionString",
"type": "ConnectionString",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Connection String for Azure Blob based destinations",
"type": "object",
"properties": {
"connectionString": {
"description": "connection string for login",
"type": "string",
"format": "password"
}
},
"required": [
"connectionString"
]
}
}
],
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些注释提供了有关在connection spec中何处查找身份验证参数的更多信息。
{
"items": [
{
"id": "be2c3209-53bc-47e7-ab25-145db8b873e1",
"name": "Azure Data Lake Gen2",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [ // describes the authentication parameters
{
"name": "Azure Service Principal Auth",
"type": "AzureServicePrincipal",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "defines auth params required for connecting to adlsgen2 using service principal",
"type": "object",
"properties": {
"url": {
"description": "Endpoint for Azure Data Lake Storage Gen2.",
"type": "string"
},
"servicePrincipalId": {
"description": "Service Principal Id to connect to ADLSGen2.",
"type": "string"
},
"servicePrincipalKey": {
"description": "Service Principal Key to connect to ADLSGen2.",
"type": "string",
"format": "password"
},
"tenant": {
"description": "Tenant information(domain name or tenant ID).",
"type": "string"
}
},
"required": [
"servicePrincipalKey",
"url",
"tenant",
"servicePrincipalId"
]
}
}
],
//...
{
"items": [
{
"id": "10440537-2a7b-4583-ac39-ed38d4b848e8",
"name": "Data Landing Zone",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [],
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些注释提供了有关在connection spec中何处查找身份验证参数的更多信息。
{
"items": [
{
"id": "c5d93acb-ea8b-4b14-8f53-02138444ae99",
"name": "Google Cloud Storage",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [ // describes the authentication parameters
{
"name": "Google Cloud Storage authentication credentials",
"type": "GoogleCloudStorageAuth",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "defines auth params required for connecting to google cloud storage connector.",
"type": "object",
"properties": {
"accessKeyId": {
"description": "Access Key Id for the user account",
"type": "string"
},
"secretAccessKey": {
"description": "Secret Access Key for the user account",
"type": "string",
"format": "password"
}
},
"required": [
"accessKeyId",
"secretAccessKey"
]
}
}
],
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些注释提供了有关在connection spec中何处查找身份验证参数的更多信息。
{
"items": [
{
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26",
"name": "SFTP",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [ // describes the authentication parameters
{
"name": "SFTP with Password",
"type": "SFTP",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "defines auth params required for connecting to sftp locations with a password",
"type": "object",
"properties": {
"domain": {
"description": "Domain of server",
"type": "string"
},
"username": {
"description": "Username",
"type": "string"
},
"password": {
"description": "Password",
"type": "string",
"format": "password"
}
},
"required": [
"password",
"domain",
"username"
]
}
},
{
"name": "SFTP with SSH Key",
"type": "SFTP",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "defines auth params required for connecting to sftp locations using SSH Key",
"type": "object",
"properties": {
"domain": {
"description": "Domain of server",
"type": "string"
},
"username": {
"description": "Username",
"type": "string"
},
"sshKey": {
"description": "Base64 string of the private SSH key",
"type": "string",
"format": "password",
"contentEncoding": "base64",
"uiAttributes": {
"tooltip": {
"id": "platform_destinations_connect_sftp_ssh",
"fallbackUrl": "http://www.adobe.com/go/destinations-sftp-connection-parameters-en "
}
}
}
},
"required": [
"sshKey",
"domain",
"username"
]
}
}
],
//...
使用身份验证规范中指定的属性(即响应中的authSpec
),您可以使用特定于每个目标类型的所需凭据创建基本连接,如以下示例所示:
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Amazon S3 Base Connection",
"auth": {
"specName": "Access Key",
"params": {
"s3SecretKey": "<Add secret key>",
"s3AccessKey": "<Add access key>"
}
},
"connectionSpec": {
"id": "4fce964d-3f37-408f-9778-e597338a21ee", // Amazon S3 connection spec
"version": "1.0"
}
}'
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Amazon S3 Base Connection",
"auth": {
"specName": "Assumed Role",
"params": {
"s3Role": "<Add s3 role>"
}
},
"connectionSpec": {
"id": "4fce964d-3f37-408f-9778-e597338a21ee", // Amazon S3 connection spec
"version": "1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Azure Blob Storage Base Connection",
"auth": {
"specName": "ConnectionString",
"params": {
"connectionString": "<Add Azure Blob connection string>"
}
},
"connectionSpec": {
"id": "6d6b59bf-fb58-4107-9064-4d246c0e5bb2", // Azure Blob Storage connection spec
"version": "1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Azure Data Lake Gen 2(ADLS Gen2) Base Connection",
"auth": {
"specName": "Azure Service Principal Auth",
"params": {
"servicePrincipalKey": "<Add servicePrincipalKey>",
"url": "<Add url>",
"tenant": "<Add tenant>",
"servicePrincipalId": "<Add servicePrincipalId>"
}
},
"connectionSpec": {
"id": "be2c3209-53bc-47e7-ab25-145db8b873e1", // Azure Data Lake Gen 2(ADLS Gen2) connection spec
"version": "1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Data Landing Zone(DLZ) Base Connection"
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Google Cloud Storage Base Connection",
"auth": {
"specName": "Google Cloud Storage authentication credentials",
"params": {
"accessKeyId": "<Add accessKeyId>",
"secretAccessKey": "<Add secret Access Key>"
}
},
"connectionSpec": {
"id": "c5d93acb-ea8b-4b14-8f53-02138444ae99", // Google Cloud Storage connection spec
"version": "1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "SFTP with password Base Connection",
"auth": {
"specName": "SFTP with Password",
"params": {
"domain": "<Add domain>",
"username": "<Add username>",
"password": "<Add password>",
"port": "<Add port>"
}
},
"connectionSpec": {
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26", // SFTP connection spec
"version": "1.0"
}
}'
specName
SFTP with Password
。domain
username
password
port
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "SFTP with SSH key Base Connection",
"auth": {
"specName": "SFTP with SSH Key",
"params": {
"domain": "<Add domain>",
"username": "<Add username>",
"sshKey": "<Add SSH key>",
"port": "<Add port>"
}
},
"connectionSpec": {
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26", // SFTP connection spec
"version": "1.0"
}
}'
specName
SFTP with Password
。domain
username
sshKey
port
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
向导出的文件添加加密
或者,您也可以向导出的文件添加加密。 为此,您需要从encryptionSpecs
添加项。 请查阅下面的请求示例,其中必填参数突出显示:
"encryptionSpecs": [
{
"name": "File PGP/GPG Encryption",
"type": "FileAsymmetric",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Defines parameters required for capturing user's inputs for encryption",
"type": "object",
"properties": {
"publicKey": {
"description": "Base64 encoded RSA public key",
"type": "string",
"contentEncoding": "base64"
},
"encryptionAlgo": {
"description": "Algorithm for encryption.",
"type": "string",
"default": "PGPGPG",
"enum": [
"PGPGPG",
"NONE"
]
}
},
"required": [
"encryptionAlgo",
"publicKey"
]
}
}
]
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/connections' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "SFTP with SSH key Base Connection",
"auth": {
"specName": "SFTP with SSH Key",
"params": {
"domain": "<Add domain>",
"username": "<Add username>",
"sshKey": "<Add SSH key>"
}
},
"encryptionSpecs":{
"specName": "Encryption spec",
"params": {
"encryptionAlgo":"PGPGPG",
"publicKey":"<Add public key>"
}
},
"connectionSpec": {
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26", // SFTP connection spec
"version": "1.0"
}
}'
响应
{
"id": "900df191-b983-45cd-90d5-4c7a0326d650",
"etag": "\"0500ebe1-0000-0200-0000-63e28d060000\""
}
记下响应中的连接ID。 创建目标连接时,此ID将在下一步中是必需的。
创建目标连接
接下来,您需要创建目标连接。 Target连接存储导出受众的导出参数。 导出参数包括导出位置、文件格式、压缩和其他详细信息。 例如,对于CSV文件,您可以选择多个导出选项。 在文件格式配置页面中获取有关所有支持的CSV导出选项的详细信息。
请参阅目标的connection spec
中提供的targetSpec
属性,以了解每个目标类型支持的属性。 请引用下面的选项卡,以查看所有受支持目标的targetSpec
属性。
请注意下面connection spec示例中带有内联注释的高亮显示行,这些行提供了有关在连接规范中何处查找target spec参数的更多信息。 您还可以在以下示例中看到以下目标参数是 不适用于 受众导出目标。
{
"items": [
{
"id": "4fce964d-3f37-408f-9778-e597338a21ee",
"name": "Amazon S3",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [...],
"encryptionSpecs": [...],
"targetSpec": { //describes the target connection parameters
"name": "User based target",
"type": "UserNamespace",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"bucketName": {
"title": "Bucket name",
"description": "Bucket name",
"type": "string",
"pattern": "(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)",
"uiAttributes": {
"tooltip": {
"id": "platform_destinations_connect_s3_bucket",
"fallbackUrl": "http://www.adobe.com/go/destinations-amazon-s3-connection-parameters-en"
}
}
},
"path": {
"title": "Folder path",
"description": "Output path for copying files",
"type": "string",
"pattern": "^[0-9a-zA-Z\/\\!\\-_\\.\\*\\''\\(\\)]*((\\%SEGMENT_(NAME|ID)\\%)?\/?)+$",
"uiAttributes": {
"tooltip": {
"id": "platform_destinations_connect_s3_folderpath",
"fallbackUrl": "http://www.adobe.com/go/destinations-amazon-s3-connection-parameters-en"
}
}
},
"fileType": {
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "NOT_CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"CSV",
"JSON",
"PARQUET"
]
},
"datasetFileType": { // does not apply to audience export destinations
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"JSON",
"PARQUET"
]
},
"csvOptions": {
"conditional": {
"field": "fileType",
"operator": "EQUALS",
"value": "CSV"
},
"title": "CSV Options",
"description": "Select your CSV options",
"type": "object",
"properties": {
"quote": {
"title": "Quote Character",
"description": "Select your Quote character",
"type": "string",
"oneOf": [
{
"title": "Double Quotes (\")",
"const": "\""
},
{
"title":"Null Character (\\)",
"const": ""
}
],
"default": ""
},
"escape": {
"title": "Escape Character",
"description": "Select your Escape character",
"type": "string",
"oneOf": [
{
"title": "Back Slash (\\)",
"const": "\\"
},
{
"title": "Single Quote (')",
"const": "'"
}
],
"default": "\\"
},
"delimiter": {
"title": "Delimiter",
"description": "Select your Delimiter",
"type": "string",
"oneOf": [
{
"title": "Comma (,)",
"const": ","
},
{
"title": "Tab (\\t)",
"const": "\t"
},
{
"title": "Pipe (|)",
"const": "|"
},
{
"title": "Semicolon (;)",
"const": ";"
},
{
"title": "Colon (:)",
"const": ":"
}
],
"default": ","
},
"nullValue": {
"title": "Null Value",
"description": "Select the output value of 'null' fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": "null"
},
"emptyValue": {
"title": "Empty Value",
"description": "Select the output value of blank fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": ""
}
}
},
"compression": {
"title": "Compression format",
"description": "Select the desired file compression format.",
"type": "string",
"enum": [
"NONE",
"GZIP"
]
}
},
"required": [
"bucketName",
"path",
"datasetFileType",
"compression",
"fileType"
]
}
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些行提供了有关在连接规范中何处查找target spec参数的更多信息。 您还可以在以下示例中看到以下目标参数是 不适用于 受众导出目标。
{
"items": [
{
"id": "6d6b59bf-fb58-4107-9064-4d246c0e5bb2",
"name": "Azure Blob Storage",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [...],
"encryptionSpecs": [...],
"targetSpec": { // describes the target connection parameters
"name": "User based target",
"type": "UserNamespace",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"title": "Folder path",
"description": "Output path (relative) indicating where to upload the data",
"type": "string",
"pattern": "^[0-9a-zA-Z\/\\!\\-_\\.\\*\\'\\(\\)]+$"
},
"container": {
"title": "Container",
"description": "Container within the storage where to upload the data",
"type": "string",
"pattern": "^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$"
},
"fileType": {
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "NOT_CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"CSV",
"JSON",
"PARQUET"
]
},
"datasetFileType": { // does not apply to audience export destinations
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"JSON",
"PARQUET"
]
},
"csvOptions": {
"conditional": {
"field": "fileType",
"operator": "EQUALS",
"value": "CSV"
},
"title": "CSV Options",
"description": "Select your CSV options",
"type": "object",
"properties": {
"quote": {
"title": "Quote Character",
"description": "Select your Quote character",
"type": "string",
"oneOf": [
{
"title": "Double Quotes (\")",
"const": "\""
},
{
"title":"Null Character (\\)",
"const": ""
}
],
"default": ""
},
"escape": {
"title": "Escape Character",
"description": "Select your Escape character",
"type": "string",
"oneOf": [
{
"title": "Back Slash (\\)",
"const": "\\"
},
{
"title": "Single Quote (')",
"const": "'"
}
],
"default": "\\"
},
"delimiter": {
"title": "Delimiter",
"description": "Select your Delimiter",
"type": "string",
"oneOf": [
{
"title": "Comma (,)",
"const": ","
},
{
"title": "Tab (\\t)",
"const": "\t"
},
{
"title": "Pipe (|)",
"const": "|"
},
{
"title": "Semicolon (;)",
"const": ";"
},
{
"title": "Colon (:)",
"const": ":"
}
],
"default": ","
},
"nullValue": {
"title": "Null Value",
"description": "Select the output value of 'null' fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": "null"
},
"emptyValue": {
"title": "Empty Value",
"description": "Select the output value of blank fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": ""
}
}
},
"compression": {
"title": "Compression format",
"description": "Select the desired file compression format.",
"type": "string",
"enum": [
"NONE",
"GZIP"
]
}
},
"required": [
"container",
"path",
"datasetFileType",
"compression",
"fileType"
]
}
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些行提供了有关在连接规范中何处查找target spec参数的更多信息。 您还可以在以下示例中看到以下目标参数是 不适用于 受众导出目标。
{
"items": [
{
"id": "be2c3209-53bc-47e7-ab25-145db8b873e1",
"name": "Azure Data Lake Gen2",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [...],
"encryptionSpecs": [...],
"targetSpec": { // describes the target connection parameters
"name": "User based target",
"type": "UserNamespace",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"title": "Folder path",
"description": "Enter the path to your Azure Data Lake Storage folder",
"type": "string"
},
"fileType": {
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "NOT_CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"CSV",
"JSON",
"PARQUET"
]
},
"datasetFileType": { // does not apply to audience export destinations
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"JSON",
"PARQUET"
]
},
"csvOptions": {
"conditional": {
"field": "fileType",
"operator": "EQUALS",
"value": "CSV"
},
"title": "CSV Options",
"description": "Select your CSV options",
"type": "object",
"properties": {
"quote": {
"title": "Quote Character",
"description": "Select your Quote character",
"type": "string",
"oneOf": [
{
"title": "Double Quotes (\")",
"const": "\""
},
{
"title":"Null Character (\\)",
"const": ""
}
],
"default": ""
},
"escape": {
"title": "Escape Character",
"description": "Select your Escape character",
"type": "string",
"oneOf": [
{
"title": "Back Slash (\\)",
"const": "\\"
},
{
"title": "Single Quote (')",
"const": "'"
}
],
"default": "\\"
},
"delimiter": {
"title": "Delimiter",
"description": "Select your Delimiter",
"type": "string",
"oneOf": [
{
"title": "Comma (,)",
"const": ","
},
{
"title": "Tab (\\t)",
"const": "\t"
},
{
"title": "Pipe (|)",
"const": "|"
},
{
"title": "Semicolon (;)",
"const": ";"
},
{
"title": "Colon (:)",
"const": ":"
}
],
"default": ","
},
"nullValue": {
"title": "Null Value",
"description": "Select the output value of 'null' fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": "null"
},
"emptyValue": {
"title": "Empty Value",
"description": "Select the output value of blank fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": ""
}
}
},
"compression": {
"title": "Compression format",
"description": "Select the desired file compression format.",
"type": "string",
"enum": [
"NONE",
"GZIP"
]
}
},
"required": [
"path",
"datasetFileType",
"compression",
"fileType"
]
}
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些行提供了有关在连接规范中何处查找target spec参数的更多信息。 您还可以在以下示例中看到以下目标参数是 不适用于 受众导出目标。
"items": [
{
"id": "10440537-2a7b-4583-ac39-ed38d4b848e8",
"name": "Data Landing Zone",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [],
"encryptionSpecs": [],
"targetSpec": { // describes the target connection parameters
"name": "User based target",
"type": "UserNamespace",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"path": {
"title": "Folder path",
"description": "Enter the path to your Azure Data Lake Storage folder",
"type": "string"
},
"fileType": {
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "NOT_CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"CSV",
"JSON",
"PARQUET"
]
},
"datasetFileType": { // does not apply to audience export destinations
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"JSON",
"PARQUET"
]
},
"csvOptions": {
"conditional": {
"field": "fileType",
"operator": "EQUALS",
"value": "CSV"
},
"title": "CSV Options",
"description": "Select your CSV options",
"type": "object",
"properties": {
"quote": {
"title": "Quote Character",
"description": "Select your Quote character",
"type": "string",
"oneOf": [
{
"title": "Double Quotes (\")",
"const": "\""
},
{
"title":"Null Character (\\)",
"const": ""
}
],
"default": ""
},
"escape": {
"title": "Escape Character",
"description": "Select your Escape character",
"type": "string",
"oneOf": [
{
"title": "Back Slash (\\)",
"const": "\\"
},
{
"title": "Single Quote (')",
"const": "'"
}
],
"default": "\\"
},
"delimiter": {
"title": "Delimiter",
"description": "Select your Delimiter",
"type": "string",
"oneOf": [
{
"title": "Comma (,)",
"const": ","
},
{
"title": "Tab (\\t)",
"const": "\t"
},
{
"title": "Pipe (|)",
"const": "|"
},
{
"title": "Semicolon (;)",
"const": ";"
},
{
"title": "Colon (:)",
"const": ":"
}
],
"default": ","
},
"nullValue": {
"title": "Null Value",
"description": "Select the output value of 'null' fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": "null"
},
"emptyValue": {
"title": "Empty Value",
"description": "Select the output value of blank fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": ""
}
}
},
"compression": {
"title": "Compression format",
"description": "Select the desired file compression format.",
"type": "string",
"enum": [
"NONE",
"GZIP"
]
}
},
"required": [
"path",
"datasetFileType",
"compression",
"fileType"
]
}
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些行提供了有关在连接规范中何处查找target spec参数的更多信息。 您还可以在以下示例中看到以下目标参数是 不适用于 受众导出目标。
{
"items": [
{
"id": "c5d93acb-ea8b-4b14-8f53-02138444ae99",
"name": "Google Cloud Storage",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [...],
"encryptionSpecs": [...],
"targetSpec": { // describes the target connection parameters
"name": "User based target",
"type": "UserNamespace",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"bucketName": {
"title": "Bucket name",
"description": "Bucket name",
"type": "string",
"pattern": "(?!^goog.*$)(?!^.*g(o|0)(o|0)gle.*$)(((?=^.{3,63}$)(^([a-z0-9]|[a-z0-9][a-z0-9\\-_]*)[a-z0-9]$))|((?=^.{3,222}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]{1,63}|[a-z0-9][a-z0-9\\-_]{1,61}[a-z0-9])\\.)*([a-z0-9]{1,63}|[a-z0-9][a-z0-9\\-_]{1,61}[a-z0-9])$)))"
},
"path": {
"title": "Folder path",
"description": "Output path for copying files",
"type": "string",
"pattern": "^[0-9a-zA-Z\/\\!\\-_\\.\\*\\''\\(\\)]*((\\%SEGMENT_(NAME|ID)\\%)?\/?)+$"
},
"fileType": {
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "NOT_CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"CSV",
"JSON",
"PARQUET"
]
},
"datasetFileType": { // does not apply to audience export destinations
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"JSON",
"PARQUET"
]
},
"csvOptions": {
"conditional": {
"field": "fileType",
"operator": "EQUALS",
"value": "CSV"
},
"title": "CSV Options",
"description": "Select your CSV options",
"type": "object",
"properties": {
"quote": {
"title": "Quote Character",
"description": "Select your Quote character",
"type": "string",
"oneOf": [
{
"title": "Double Quotes (\")",
"const": "\""
},
{
"title":"Null Character (\\)",
"const": ""
}
],
"default": ""
},
"escape": {
"title": "Escape Character",
"description": "Select your Escape character",
"type": "string",
"oneOf": [
{
"title": "Back Slash (\\)",
"const": "\\"
},
{
"title": "Single Quote (')",
"const": "'"
}
],
"default": "\\"
},
"delimiter": {
"title": "Delimiter",
"description": "Select your Delimiter",
"type": "string",
"oneOf": [
{
"title": "Comma (,)",
"const": ","
},
{
"title": "Tab (\\t)",
"const": "\t"
},
{
"title": "Pipe (|)",
"const": "|"
},
{
"title": "Semicolon (;)",
"const": ";"
},
{
"title": "Colon (:)",
"const": ":"
}
],
"default": ","
},
"nullValue": {
"title": "Null Value",
"description": "Select the output value of 'null' fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": "null"
},
"emptyValue": {
"title": "Empty Value",
"description": "Select the output value of blank fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": ""
}
}
},
"compression": {
"title": "Compression format",
"description": "Select the desired file compression format.",
"type": "string",
"enum": [
"NONE",
"GZIP"
]
}
},
"required": [
"bucketName",
"path",
"datasetFileType",
"compression",
"fileType"
]
}
//...
请注意下面connection spec示例中带有内联注释的高亮显示行,这些行提供了有关在连接规范中何处查找target spec参数的更多信息。 您还可以在以下示例中看到以下目标参数是 不适用于 受众导出目标。
{
"items": [
{
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26",
"name": "SFTP",
"providerId": "14e34fac-d307-11e9-bb65-2a2ae2dbcce4",
"version": "1.0",
"authSpec": [...],
"encryptionSpecs": [...],
"targetSpec": { // describes the target connection parameters
"name": "User based target",
"type": "UserNamespace",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"remotePath": {
"title": "Folder path",
"description": "Enter your folder path",
"type": "string"
},
"fileType": {
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "NOT_CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"CSV",
"JSON",
"PARQUET"
]
},
"datasetFileType": { // does not apply to audience export destinations
"conditional": {
"field": "flowSpec.attributes._workflow",
"operator": "CONTAINS",
"value": "DATASETS"
},
"title": "File Type",
"description": "Select file format",
"type": "string",
"enum": [
"JSON",
"PARQUET"
]
},
"csvOptions": {
"conditional": {
"field": "fileType",
"operator": "EQUALS",
"value": "CSV"
},
"title": "CSV Options",
"description": "Select your CSV options",
"type": "object",
"properties": {
"quote": {
"title": "Quote Character",
"description": "Select your Quote character",
"type": "string",
"oneOf": [
{
"title": "Double Quotes (\")",
"const": "\""
},
{
"title":"Null Character (\\)",
"const": ""
}
],
"default": ""
},
"escape": {
"title": "Escape Character",
"description": "Select your Escape character",
"type": "string",
"oneOf": [
{
"title": "Back Slash (\\)",
"const": "\\"
},
{
"title": "Single Quote (')",
"const": "'"
}
],
"default": "\\"
},
"delimiter": {
"title": "Delimiter",
"description": "Select your Delimiter",
"type": "string",
"oneOf": [
{
"title": "Comma (,)",
"const": ","
},
{
"title": "Tab (\\t)",
"const": "\t"
},
{
"title": "Pipe (|)",
"const": "|"
},
{
"title": "Semicolon (;)",
"const": ";"
},
{
"title": "Colon (:)",
"const": ":"
}
],
"default": ","
},
"nullValue": {
"title": "Null Value",
"description": "Select the output value of 'null' fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": "null"
},
"emptyValue": {
"title": "Empty Value",
"description": "Select the output value of blank fields",
"type": "string",
"oneOf": [
{
"title": "null",
"const": "null"
},
{
"title": "\"\"",
"const": "\"\""
},
{
"title": "Empty String",
"const": ""
}
],
"default": ""
}
}
},
"compression": {
"title": "Compression format",
"description": "Select the desired file compression format.",
"type": "string",
"enum": [
"GZIP",
"NONE"
]
}
},
"required": [
"remotePath",
"datasetFileType",
"compression",
"fileType"
]
},
//...
通过使用上述规范,您可以构建特定于所需云存储目标的目标连接请求,如下面的选项卡所示。
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Amazon S3 Target Connection",
"baseConnectionId": "<FROM_STEP_CREATE_BASE_CONNECTION>",
"params": {
"mode": "Server-to-server",
"bucketName": "your-bucket-name",
"path": "folder/subfolder",
"compression": "NONE",
"fileType": "JSON"
},
"connectionSpec": {
"id": "4fce964d-3f37-408f-9778-e597338a21ee", // Amazon S3 connection spec id
"version": "1.0"
}
}'
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name":"Amazon S3 Target Connection",
"baseConnectionId":"<FROM_STEP_CREATE_BASE_CONNECTION>",
"params":{
"mode":"Server-to-server",
"bucketName":"your-bucket-name",
"path":"folder/subfolder",
"compression":"GZIP",
"fileType":"CSV",
"csvOptions":{
"nullValue":"null",
"emptyValue":"",
"escape":"\\",
"quote":"",
"delimiter":","
}
},
"connectionSpec":{
"id":"4fce964d-3f37-408f-9778-e597338a21ee",
"version":"1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Azure Blob Storage Target Connection",
"baseConnectionId": "<FROM_STEP_CREATE_BASE_CONNECTION>",
"params": {
"mode": "Server-to-server",
"container": "your-container-name",
"path": "folder/subfolder",
"compression": "NONE",
"fileType": "JSON"
},
"connectionSpec": {
"id": "6d6b59bf-fb58-4107-9064-4d246c0e5bb2", // Azure Blob Storage connection spec id
"version": "1.0"
}
}'
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name":"Azure Blob Storage Target Connection",
"baseConnectionId":"<FROM_STEP_CREATE_BASE_CONNECTION>",
"params":{
"mode":"Server-to-server",
"bucketName":"your-bucket-name",
"path":"folder/subfolder",
"compression":"GZIP",
"fileType":"CSV",
"csvOptions":{
"nullValue":"null",
"emptyValue":"",
"escape":"\\",
"quote":"",
"delimiter":","
}
},
"connectionSpec":{
"id":"6d6b59bf-fb58-4107-9064-4d246c0e5bb2",
"version":"1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Azure Data Lake Gen 2(ADLS Gen2) Target Connection",
"baseConnectionId": "<FROM_STEP_CREATE_BASE_CONNECTION>",
"params": {
"mode": "Server-to-server",
"path": "folder/subfolder",
"compression": "NONE",
"fileType": "JSON"
},
"connectionSpec": {
"id": "be2c3209-53bc-47e7-ab25-145db8b873e1", // Azure Data Lake Gen 2(ADLS Gen2) connection spec id
"version": "1.0"
}
}'
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name":"Azure Data Lake Gen 2(ADLS Gen2)",
"baseConnectionId":"<FROM_STEP_CREATE_BASE_CONNECTION>",
"params":{
"mode":"Server-to-server",
"bucketName":"your-bucket-name",
"path":"folder/subfolder",
"compression":"GZIP",
"fileType":"CSV",
"csvOptions":{
"nullValue":"null",
"emptyValue":"",
"escape":"\\",
"quote":"",
"delimiter":","
}
},
"connectionSpec":{
"id":"be2c3209-53bc-47e7-ab25-145db8b873e1",
"version":"1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Data Landing Zone Target Connection",
"baseConnectionId": "<FROM_STEP_CREATE_BASE_CONNECTION>",
"params": {
"mode": "Server-to-server",
"path": "folder/subfolder",
"compression": "NONE",
"fileType": "JSON"
},
"connectionSpec": {
"id": "10440537-2a7b-4583-ac39-ed38d4b848e8", // Data Landing Zone connection spec id
"version": "1.0"
}
}'
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name":"Data Landing Zone Target Connection",
"baseConnectionId":"<FROM_STEP_CREATE_BASE_CONNECTION>",
"params":{
"mode":"Server-to-server",
"bucketName":"your-bucket-name",
"path":"folder/subfolder",
"compression":"GZIP",
"fileType":"CSV",
"csvOptions":{
"nullValue":"null",
"emptyValue":"",
"escape":"\\",
"quote":"",
"delimiter":","
}
},
"connectionSpec":{
"id":"10440537-2a7b-4583-ac39-ed38d4b848e8",
"version":"1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Google Cloud Storage Target Connection",
"baseConnectionId": "<FROM_STEP_CREATE_BASE_CONNECTION>",
"params": {
"mode": "Server-to-server",
"bucketName": "your-bucket-name",
"path": "folder/subfolder",
"compression": "NONE",
"fileType": "JSON"
},
"connectionSpec": {
"id": "c5d93acb-ea8b-4b14-8f53-02138444ae99", // Google Cloud Storage connection spec id
"version": "1.0"
}
}'
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name":"Google Cloud Storage Target Connection",
"baseConnectionId":"<FROM_STEP_CREATE_BASE_CONNECTION>",
"params":{
"mode":"Server-to-server",
"bucketName":"your-bucket-name",
"path":"folder/subfolder",
"compression":"GZIP",
"fileType":"CSV",
"csvOptions":{
"nullValue":"null",
"emptyValue":"",
"escape":"\\",
"quote":"",
"delimiter":","
}
},
"connectionSpec":{
"id":"c5d93acb-ea8b-4b14-8f53-02138444ae99",
"version":"1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "SFTP Target Connection",
"baseConnectionId": "<FROM_STEP_CREATE_BASE_CONNECTION>",
"params": {
"mode": "Server-to-server",
"remotePath": "folder/subfolder",
"compression": "NONE",
"fileType": "JSON"
},
"connectionSpec": {
"id": "36965a81-b1c6-401b-99f8-22508f1e6a26", // SFTP connection spec id
"version": "1.0"
}
}'
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/targetConnections' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name":"SFTP Target Connection",
"baseConnectionId":"<FROM_STEP_CREATE_BASE_CONNECTION>",
"params":{
"mode":"Server-to-server",
"bucketName":"your-bucket-name",
"path":"folder/subfolder",
"compression":"GZIP",
"fileType":"CSV",
"csvOptions":{
"nullValue":"null",
"emptyValue":"",
"escape":"\\",
"quote":"",
"delimiter":","
}
},
"connectionSpec":{
"id":"36965a81-b1c6-401b-99f8-22508f1e6a26",
"version":"1.0"
}
}'
响应
{
"id": "12401496-2573-4ca7-8137-fef1aeb9dd4c",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
记下响应中的target connection ID
。 创建数据流以导出受众时,在下一步中需要此ID。
成功的响应返回新目标源连接的ID (id
)和etag
。 记下目标连接ID,因为稍后创建数据流时会需要它。
创建数据流
目标配置的下一步是创建数据流。 数据流将以前创建的实体绑定在一起,还提供了用于配置受众导出计划的选项。 要创建数据流,请根据所需的云存储目标使用以下有效负载,并替换之前步骤中的流实体ID。 请注意,在此步骤中,您不会将任何与属性或标识映射相关的信息添加到数据流。 这将在下一步中进行。
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/flows' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Activate audiences to an Amazon S3 cloud storage destination",
"description": "This operation creates a dataflow to export audiences to an Amazon S3 cloud storage destination",
"flowSpec": {
"id": "1a0514a6-33d4-4c7f-aff8-594799c47549", // Amazon S3 flow spec ID
"version": "1.0"
},
"sourceConnectionIds": [
"<FROM_STEP_CREATE_SOURCE_CONNECTION>"
],
"targetConnectionIds": [
"<FROM_STEP_CREATE_TARGET_CONNECTION>"
],
"transformations": []
}'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/flows' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Activate audiences to an Azure Blob Storage cloud storage destination",
"description": "This operation creates a dataflow to export audiences to an Azure Blob Storage cloud storage destination",
"flowSpec": {
"id": "752d422f-b16f-4f0d-b1c6-26e448e3b388", // Azure Blob Storage flow spec ID
"version": "1.0"
},
"sourceConnectionIds": [
"<FROM_STEP_CREATE_SOURCE_CONNECTION>"
],
"targetConnectionIds": [
"<FROM_STEP_CREATE_TARGET_CONNECTION>"
],
"transformations": [
{
"name": "GeneralTransform",
"params": {
"mandatoryFields": [],
"primaryFields": [],
"profileMapping": {},
"segmentSelectors": {
"selectors": []
}
}
}
]
}'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/flows' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Activate audiences to an Azure Data Lake Gen 2(ADLS Gen2) cloud storage destination",
"description": "This operation creates a dataflow to export audiences to an Azure Data Lake Gen 2(ADLS Gen2) cloud storage destination",
"flowSpec": {
"id": "17be2013-2549-41ce-96e7-a70363bec293", // Azure Data Lake Gen 2(ADLS Gen2) flow spec ID
"version": "1.0"
},
"sourceConnectionIds": [
"<FROM_STEP_CREATE_SOURCE_CONNECTION>"
],
"targetConnectionIds": [
"<FROM_STEP_CREATE_TARGET_CONNECTION>"
],
"transformations": []
}'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/flows' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Activate audiences to a Data Landing Zone cloud storage destination",
"description": "This operation creates a dataflow to export audiences to a Data Landing Zone cloud storage destination",
"flowSpec": {
"id": "cd2fc47e-e838-4f38-a581-8fff2f99b63a", // Data Landing Zone flow spec ID
"version": "1.0"
},
"sourceConnectionIds": [
"<FROM_STEP_CREATE_SOURCE_CONNECTION>"
],
"targetConnectionIds": [
"<FROM_STEP_CREATE_TARGET_CONNECTION>"
],
"transformations": []
}'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/flows' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Activate audiences to a Google Cloud Storage cloud storage destination",
"description": "This operation creates a dataflow to export audiences to a Google Cloud Storage destination",
"flowSpec": {
"id": "585c15c4-6cbf-4126-8f87-e26bff78b657", // Google Cloud Storage flow spec ID
"version": "1.0"
},
"sourceConnectionIds": [
"<FROM_STEP_CREATE_SOURCE_CONNECTION>"
],
"targetConnectionIds": [
"<FROM_STEP_CREATE_TARGET_CONNECTION>"
],
"transformations": []
}'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
请求
请注意请求示例中带有内联注释的高亮显示行,这些行提供了更多信息。 将请求复制粘贴到您选择的终端时,删除请求中的内联注释。
curl --location --request POST 'https://platform.adobe.io/data/foundation/flowservice/flows' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw '{
"name": "Activate audiences to an SFTP cloud storage destination",
"description": "This operation creates a dataflow to export audiences to an SFTP cloud storage destination",
"flowSpec": {
"id": "fd36aaa4-bf2b-43fb-9387-43785eeeb799", // SFTP flow spec ID
"version": "1.0"
},
"sourceConnectionIds": [
"<FROM_STEP_CREATE_SOURCE_CONNECTION>"
],
"targetConnectionIds": [
"<FROM_STEP_CREATE_TARGET_CONNECTION>"
],
"transformations": []
}'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
记下响应中的数据流ID。 此ID在后续步骤中是必需的。
将受众添加到导出
在此步骤中,您还可以选择要导出到目标的受众。 有关此步骤以及将受众添加到数据流的请求格式的更多信息,请查看API参考文档的更新目标数据流部分中的示例。
设置属性和标识映射
创建数据流后,您需要为要导出的属性和身份设置映射。 这包含三个步骤,如下所示:
- 创建输入架构
- 创建输出架构
- 设置映射集以连接创建的架构
例如,要获取UI中显示的以下映射,您需要完成上面列出的三个步骤,并在下一个标题中详述。
创建输入架构
要创建输入架构,您首先需要检索合并架构以及可导出到目标的标识。 这是属性和标识的架构,您可以选择它作为源映射。
查看以下用于检索属性和身份的请求和响应示例。
请求获取属性
curl --location --request GET 'https://platform.adobe.io/data/core/ups/config/entityTypes/_xdm.context.profile?property=fullSchema==true&property=includeRelationshipDescriptors==true' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
响应
为简短起见,下面的答复已缩短。
"person": {
"title": "Person",
"description": "An individual actor, contact, or owner.",
"meta:referencedFrom": [
"https://ns.adobe.com/xdm/context/person"
],
"type": "object",
"meta:xdmType": "object",
"properties": {
"birthDate": {
"meta:xdmType": "date",
"type": "string",
"format": "date",
"title": "Birth date(YYYY-MM-DD)",
"description": "The full date a person was born."
},
"birthDayAndMonth": {
"type": "string",
"meta:xdmType": "string",
"title": "Birth date (MM-DD)",
"description": "The day and month a person was born, in the format MM-DD. This field should be used when the day and month of a person's birth is known, but not the year."
},
"birthYear": {
"meta:xdmType": "short",
"type": "integer",
"minimum": 1,
"maximum": 32767,
"title": "Birth year",
"description": "The year a person was born including the century, for example, 1983. This field should be used when only the person's age is known, not the full birth date."
},
"gender": {
"type": "string",
"meta:xdmType": "string",
"title": "Gender",
"description": "Gender identity of the person.\n",
"enum": [
"male",
"female",
"not_specified",
"non_specific"
],
"meta:enum": {
"male": "Male",
"female": "Female",
"not_specified": "Not Specified",
"non_specific": "Non-specific"
},
"default": "not_specified"
},
"maritalStatus": {
"type": "string",
"meta:xdmType": "string",
"title": "Marital Status",
"description": "Describes a person's relationship with a significant other.",
"enum": [
"married",
"single",
"divorced",
"widowed",
"not_specified"
],
"meta:enum": {
"divorced": "Divorced",
"not_specified": "Not Specified",
"married": "Married",
"single": "Single",
"widowed": "Widowed"
},
"default": "not_specified"
},
"name": {
"title": "Full name",
"description": "The person's full name.",
"meta:referencedFrom": [
"https://ns.adobe.com/xdm/context/person-name"
],
"type": "object",
"meta:xdmType": "object",
"properties": {
"courtesyTitle": {
"type": "string",
"meta:xdmType": "string",
"title": "Courtesy title",
"description": "Normally an abbreviation of a persons title, honorific, or salutation. The `courtesyTitle` is used in front of full or last name in opening texts. For example, Mr. Miss. or Dr."
},
"firstName": {
"type": "string",
"meta:xdmType": "string",
"title": "First name",
"description": "The first audience of the name in the writing order most commonly accepted in the language of the name. In many cultures this is the preferred personal or given name. The `firstName` and `lastName` properties have been introduced to maintain compatibility with existing systems that model names in a simplified, non-semantic, and non-internationalizable way. Using `xdm:fullName` is always preferable."
},
"fullName": {
"type": "string",
"meta:xdmType": "string",
"title": "Full name",
"description": "The full name of the person, in writing order most commonly accepted in the language of the name."
},
"lastName": {
"type": "string",
"meta:xdmType": "string",
"title": "Last name",
"description": "The last audience of the name in the writing order most commonly accepted in the language of the name. In many cultures this is the inherited family name, surname, patronymic, or matronymic name. The `firstName` and `lastName` properties have been introduced to maintain compatibility with existing systems that model names in a simplified, non-semantic, and non-internationalizable way. Using `xdm:fullName` is always preferable."
},
"middleName": {
"type": "string",
"meta:xdmType": "string",
"title": "Middle name",
"description": "Middle, alternative, or additional names supplied between the first name and last name."
},
"suffix": {
"type": "string",
"meta:xdmType": "string",
"title": "Suffix",
"description": "A group of letters provided after a person's name to provide additional information. The `suffix` is used at the end of someones name. For example Jr., Sr., M.D., PhD, I, II, III, etc."
}
}
},
"nationality": {
"type": "string",
"meta:xdmType": "string",
"title": "Nationality",
"description": "The legal relationship between a person and their state represented using the ISO 3166-1 Alpha-2 code."
},
"taxId": {
"type": "string",
"meta:xdmType": "string",
"title": "Tax ID",
"description": "The Tax / Fiscal ID of the person, e.g. the TIN in the US or the CIF/NIF in Spain.",
"meta:status": "deprecated"
},
"type": {
"type": "string",
"meta:xdmType": "string",
"title": "Type",
"description": "The type of individual in different business contexts like B2C."
}
}
}
请求获取身份
curl --location --request GET 'https://platform.adobe.io/data/core/idnamespace/identities' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
响应
响应将返回在创建输入架构时可以使用的标识。 请注意,此响应会返回您在Experience Platform中设置的standard和custom身份命名空间。
[
{
"updateTime": 1551688425455,
"code": "CORE",
"status": "ACTIVE",
"description": "Adobe Audience Manger UUID",
"id": 0,
"createTime": 1551688425455,
"idType": "COOKIE",
"namespaceType": "Standard",
"name": "CORE",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "ECID",
"status": "ACTIVE",
"description": "Adobe Experience Cloud ID",
"id": 4,
"createTime": 1551688425455,
"idType": "COOKIE",
"namespaceType": "Standard",
"name": "ECID",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "AdCloud",
"status": "ACTIVE",
"description": "Adobe AdCloud - ID Syncing Partner",
"id": 411,
"createTime": 1551688425455,
"idType": "COOKIE",
"namespaceType": "Standard",
"name": "AdCloud",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "Email_LC_SHA256",
"status": "ACTIVE",
"description": "Email addresses need to be hashed using SHA256 and lowercased. Please also note that leading and trailing spaces need to be trimmed before an email address is normalized. You won't be able to change this setting later",
"id": 11,
"createTime": 1551688425455,
"idType": "Email",
"namespaceType": "Standard",
"name": "Emails (SHA256, lowercased)",
"custom": false,
"hashFunction": "SHA256",
"transform": "lowercase"
},
{
"updateTime": 1597996026101,
"code": "Phone_E.164",
"status": "ACTIVE",
"description": "Namespace for raw phone numbers in E.164 format. + sign is required",
"id": 17,
"createTime": 1597996026101,
"idType": "Phone",
"namespaceType": "Standard",
"name": "Phone (E.164)",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "GAID",
"status": "ACTIVE",
"description": "This datasource is associated to a Google Ad ID",
"id": 20914,
"createTime": 1551688425455,
"idType": "DEVICE",
"namespaceType": "Standard",
"name": "Google Ad ID (GAID)",
"custom": false
},
{
"updateTime": 1476993749000,
"code": "IDFA",
"status": "ACTIVE",
"description": "Apple ID for Advertisers. See: https://support.apple.com/en-us/HT202074 for more info.",
"id": 20915,
"createTime": 1476993749000,
"idType": "DEVICE",
"namespaceType": "Standard",
"name": "Apple IDFA (ID for Advertisers)",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "AAID",
"status": "ACTIVE",
"description": "Adobe Analytics (Legacy ID)",
"id": 10,
"createTime": 1551688425455,
"idType": "COOKIE",
"namespaceType": "Standard",
"name": "Adobe Analytics (Legacy ID)",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "Email",
"status": "ACTIVE",
"description": "Email",
"id": 6,
"createTime": 1551688425455,
"idType": "Email",
"namespaceType": "Standard",
"name": "Email",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "WAID",
"status": "ACTIVE",
"description": "Windows AID",
"id": 8,
"createTime": 1551688425455,
"idType": "DEVICE",
"namespaceType": "Standard",
"name": "Windows AID",
"custom": false
},
{
"updateTime": 1551688425455,
"code": "TNTID",
"status": "ACTIVE",
"description": "Adobe Target (TNTID)",
"id": 9,
"createTime": 1551688425455,
"idType": "COOKIE",
"namespaceType": "Standard",
"name": "TNTID",
"custom": false
},
{
"updateTime": 1556676464714,
"code": "Google",
"status": "ACTIVE",
"id": 771,
"createTime": 1556676464714,
"idType": "COOKIE",
"namespaceType": "Integration",
"name": "Google",
"custom": false
},
{
"updateTime": 1604597776019,
"code": "Phone_SHA256_E.164",
"status": "ACTIVE",
"description": "Phone numbers need to be hashed using SHA256 without any dashes. Hash should be completed by customers on raw phone numbers in E.164 format. Please note that some destinations may have different phone number formatting requirements. Refer to documentation or consult your Adobe representative",
"id": 18,
"createTime": 1604597776019,
"idType": "Phone",
"namespaceType": "Standard",
"name": "Phone (SHA256_E.164)",
"custom": false,
"hashFunction": "SHA256"
},
{
"updateTime": 1604597776019,
"code": "Phone_SHA256",
"status": "ACTIVE",
"description": "Remove symbols, letters, and any leading zeroes before hashing. Prefix the country code before hashing. Please note that some destinations may have different phone number formatting requirements. Refer to documentation or consult your Adobe representative",
"id": 15,
"createTime": 1597995542594,
"idType": "Phone",
"namespaceType": "Standard",
"name": "Phone (SHA256)",
"custom": false,
"hashFunction": "SHA256"
},
{
"updateTime": 1551688425455,
"code": "Phone",
"status": "ACTIVE",
"description": "Phone",
"id": 7,
"createTime": 1551688425455,
"idType": "PHONE_NUMBER",
"namespaceType": "Standard",
"name": "Phone",
"custom": false
}
]
接下来,您需要复制上面的响应,并使用它创建输入架构。 您可以复制上述响应中的整个JSON响应,并将其放入下面指示的jsonSchema
对象中。
请求创建输入架构
curl --location --request POST 'https://platform.adobe.io/data/foundation/conversion/schemas/' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":"Sample Schema for Flow Mapping",
"jsonSchema":{...insert response from union schema response here}
'
响应
{
"id":"8db56468c2ab475dbf17c2621f92c0f8",
"version":0,
"jsonSchema":{
"title":"XDM Individual Profile",
"description":"An XDM Individual Profile forms a singular representation of the attributes and interests of both identified and partially-identified individuals. Less-identified profiles may contain only anonymous behavioral signals, such as browser cookies, while highly-identified profiles may contain detailed personal information such as name, date of birth, location, and email address. As a profile grows, it becomes a robust repository of personal information, identification information, contact details, and communication preferences for an individual.",
"type":"object",
"properties":{ // this section returns the contents that you have added to the jsonSchema object in the request
}
}
}
响应中的ID表示您创建的输入架构的唯一标识符。 从响应中复制ID,因为您将在后续步骤中重复使用它。
创建输出架构
接下来,必须为导出设置输出架构。 首先,您需要查找并检查现有合作伙伴架构。
请求
请注意,以下示例对Amazon S3使用connection spec ID
。 请将此值替换为特定于目标的连接规范ID。
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/connectionSpecs/4fce964d-3f37-408f-9778-e597338a21ee' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-api-key: {API_KEY}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
包含示例架构的响应
检查执行上述调用时获得的响应。 您需要深入到响应以查找对象targetSpec.attributes.partnerSchema.jsonSchema
{
"title":"defaultschema",
"type":"object",
"properties":{
"attributes":{
"type":"object",
"meta:xdmType":"map",
"additionalProperties":{
"type":"object",
"properties":{
"value":{
"type":"string",
"title":"Value"
}
},
"meta:xdmType":"object"
}
},
"identityMap":{
"type":"object",
"meta:xdmField":"xdm:identityMap",
"meta:xdmType":"map",
"additionalProperties":{
"type":"array",
"items":{
"type":"object",
"properties":{
"id":{
"type":"string",
"title":"Identifier",
"description":"Identity of the consumer in the related namespace.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:id"
},
"primary":{
"type":"boolean",
"title":"Primary",
"default":false,
"description":"Indicates this identity is the preferred identity. Is used as a hint to help systems better organize how identities are queried.",
"meta:xdmType":"boolean",
"meta:xdmField":"xdm:primary"
},
"authenticatedState":{
"enum":[
"ambiguous",
"authenticated",
"loggedOut"
],
"type":"string",
"default":"ambiguous",
"meta:enum":{
"ambiguous":"Ambiguous",
"loggedOut":"User was identified by a login action at some point of time previously, but is not currently logged in.",
"authenticated":"User identified by a login or similar action that was valid at the time of the event observation."
},
"description":"The state this identity is authenticated as for this observed ExperienceEvent.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:authenticatedState"
}
},
"meta:xdmType":"object",
"meta:referencedFrom":"https://ns.adobe.com/xdm/context/identityitem"
},
"meta:xdmType":"array"
}
},
"segmentMembership":{
"title":"Segment membership map",
"type":"object",
"meta:xdmField":"xdm:segmentMembership",
"meta:xdmType":"map",
"additionalProperties":{
"type":"object",
"title":"Segment membership per namespace",
"meta:xdmType":"map",
"additionalProperties":{
"type":"object",
"properties":{
"status":{
"enum":[
"realized",
"exited"
],
"type":"string",
"title":"Status",
"default":"realized",
"meta:enum":{
"exited":"Entity is exiting the segment.",
"realized":"Entity is entering the segment."
},
"description":"Is the audience participation realized as part of the current request.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:status"
},
"payload":{
"type":"object",
"title":"Payload",
"required":[
"payloadType"
],
"properties":{
"payloadType":{
"enum":[
"boolean",
"number",
"propensity",
"string"
],
"type":"string",
"title":"Payload Type",
"meta:enum":{
"number":"Number",
"string":"String",
"boolean":"Boolean",
"propensity":"Propensity"
},
"description":"The type of payload.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:payloadType"
},
"payloadNumberValue":{
"type":"number",
"title":"Value",
"description":"The number.",
"meta:xdmType":"number",
"meta:xdmField":"xdm:payloadNumberValue"
},
"payloadStringValue":{
"type":"string",
"title":"Value",
"description":"The string value.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:payloadStringValue"
},
"payloadBooleanValue":{
"type":"boolean",
"title":"Value",
"description":"The boolean value.",
"meta:xdmType":"boolean",
"meta:xdmField":"xdm:payloadBooleanValue"
},
"payloadPropensityValue":{
"type":"number",
"title":"Value",
"maximum":1,
"description":"The propensity.",
"meta:xdmType":"number",
"meta:xdmField":"xdm:payloadPropensityValue",
"exclusiveMinimum":0
}
},
"description":"Values that are directly related with the audience realization. This payload exists with the same 'validUntil' as the audience realization. Note that the intention is that exactly one payload value be included, as indicated by the payload type. This was originally modeled using 'oneOf', but due to limitations in our tooling that was removed. This more semantically meaningful representation will be re-introduced in the future.",
"meta:xdmType":"object",
"meta:xdmField":"xdm:payload"
},
"version":{
"type":"string",
"title":"Version",
"description":"The version of the audience definition used in this audience assertion. Version can be omitted in audience lists when all memberships versions are the same.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:version"
},
"segmentID":{
"type":"object",
"title":"Segment ID",
"properties":{
"_id":{
"type":"string",
"title":"Identifier",
"format":"uri-reference",
"description":"Identity of the audience in the related namespace.",
"meta:xdmType":"string",
"meta:xdmField":"@id"
},
"xid":{
"type":"string",
"title":"Experience identifier",
"description":"When present, this value represents a cross-namespace identifier that is unique across all namespace-scoped identifiers in all namespaces.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:xid"
},
"namespace":{
"type":"object",
"title":"Namespace",
"required":[
"code"
],
"properties":{
"code":{
"type":"string",
"title":"Code",
"description":"The code is a human readable identifier for the namespace and can be used to request the technical namespace id which is used for identity graph processing.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:code"
}
},
"description":"The namespace associated with the `xid` attribute.",
"meta:xdmType":"object",
"meta:xdmField":"xdm:namespace",
"meta:referencedFrom":"https://ns.adobe.com/xdm/context/namespace"
}
},
"description":"The identity of the audience or snapshot definition in with the domain of the specific system that processes that type of segment. Deprecated.",
"meta:status":"deprecated",
"meta:xdmType":"object",
"meta:xdmField":"xdm:segmentID",
"meta:referencedFrom":"https://ns.adobe.com/xdm/context/segmentidentity"
},
"validUntil":{
"type":"string",
"title":"Valid until",
"format":"date-time",
"description":"The timestamp for when the audienceassertion should no longer be assumed to be valid and should either be ignored or revalidated.",
"meta:xdmType":"date-time",
"meta:xdmField":"xdm:validUntil"
},
"profileStitchID":{
"type":"object",
"properties":{
"_id":{
"type":"string",
"title":"Identifier",
"format":"uri-reference",
"description":"Identity of the profile stitch in the related namespace.",
"meta:xdmType":"string",
"meta:xdmField":"@id"
},
"xid":{
"type":"string",
"title":"Experience identifier",
"description":"When present, this value represents a cross-namespace identifier that is unique across all namespace-scoped identifiers in all namespaces.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:xid"
},
"namespace":{
"type":"object",
"title":"Namespace",
"required":[
"code"
],
"properties":{
"code":{
"type":"string",
"title":"Code",
"description":"The code is a human readable identifier for the namespace and can be used to request the technical namespace id which is used for identity graph processing.",
"meta:xdmType":"string",
"meta:xdmField":"xdm:code"
}
},
"description":"The namespace associated with the `xid` attribute.",
"meta:xdmType":"object",
"meta:xdmField":"xdm:namespace",
"meta:referencedFrom":"https://ns.adobe.com/xdm/context/namespace"
}
},
"meta:xdmType":"object",
"meta:xdmField":"xdm:profileStitchID",
"meta:referencedFrom":"https://ns.adobe.com/xdm/context/profileStitchIdentity"
},
"lastQualificationTime":{
"type":"string",
"title":"Last qualification time",
"format":"date-time",
"description":"The timestamp when the assertion of audience membership was made.",
"meta:xdmType":"date-time",
"meta:xdmField":"xdm:lastQualificationTime"
}
},
"meta:xdmType":"object",
"meta:referencedFrom":"https://ns.adobe.com/xdm/context/segmentmembership"
}
}
}
}
}
接下来,您需要创建输出架构。 复制上面的JSON响应并将其粘贴到下面的jsonSchema
对象中。
请求
curl --location --request POST 'https://platform.adobe.io/data/foundation/conversion/schemas' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Sample Schema for Flow Mapping",
"jsonSchema":{...insert JSON from the response above here}
}
'
响应
{
"id": "2f4fd51934c1409fb1d8207dd9f43dc9",
"version": 0,
"jsonSchema": {
"title": "defaultschema",
"type": "object",
"properties": {
"identityMap": {
"type": "object",
"meta:xdmField": "xdm:identityMap",
"meta:xdmType": "map",
"additionalProperties": {
"meta:xdmType": "array",
"items": {
"meta:referencedFrom": "https://ns.adobe.com/xdm/context/identityitem",
"properties": {
"primary": {
"meta:xdmField": "xdm:primary",
"meta:xdmType": "boolean",
"description": "Indicates this identity is the preferred identity. Is used as a hint to help systems better organize how identities are queried.",
"default": false,
"type": "boolean",
"title": "Primary"
},
"id": {
"meta:xdmField": "xdm:id",
"meta:xdmType": "string",
"description": "Identity of the consumer in the related namespace.",
"type": "string",
"title": "Identifier"
},
"authenticatedState": {
"meta:xdmField": "xdm:authenticatedState",
"meta:xdmType": "string",
"meta:enum": {
"loggedOut": "User was identified by a login action at some point of time previously, but is not currently logged in.",
"authenticated": "User identified by a login or similar action that was valid at the time of the event observation.",
"ambiguous": "Ambiguous"
},
"enum": [
"ambiguous",
"authenticated",
"loggedOut"
],
"default": "ambiguous",
"type": "string",
"description": "The state this identity is authenticated as for this observed ExperienceEvent."
}
},
"meta:xdmType": "object",
"type": "object"
},
"type": "array"
}
},
"segmentMembership": {
"title": "Segment membership map",
"type": "object",
"meta:xdmField": "xdm:segmentMembership",
"meta:xdmType": "map",
"additionalProperties": {
"additionalProperties": {
"meta:referencedFrom": "https://ns.adobe.com/xdm/context/segmentmembership",
"properties": {
"version": {
"meta:xdmField": "xdm:version",
"meta:xdmType": "string",
"description": "The version of the audience definition used in this audience assertion. Version can be omitted in audience lists when all memberships versions are the same.",
"type": "string",
"title": "Version"
},
"validUntil": {
"meta:xdmField": "xdm:validUntil",
"meta:xdmType": "date-time",
"description": "The timestamp for when the audienceassertion should no longer be assumed to be valid and should either be ignored or revalidated.",
"format": "date-time",
"type": "string",
"title": "Valid until"
},
"status": {
"meta:xdmField": "xdm:status",
"meta:xdmType": "string",
"meta:enum": {
"exited": "Entity is exiting the segment.",
"realized": "Entity is entering the segment."
},
"enum": [
"realized",
"exited"
],
"default": "realized",
"description": "Is the audience participation realized as part of the current request.",
"type": "string",
"title": "Status"
},
"segmentID": {
"meta:xdmField": "xdm:segmentID",
"meta:referencedFrom": "https://ns.adobe.com/xdm/context/segmentidentity",
"properties": {
"xid": {
"meta:xdmField": "xdm:xid",
"meta:xdmType": "string",
"description": "When present, this value represents a cross-namespace identifier that is unique across all namespace-scoped identifiers in all namespaces.",
"type": "string",
"title": "Experience identifier"
},
"namespace": {
"meta:xdmField": "xdm:namespace",
"required": [
"code"
],
"meta:referencedFrom": "https://ns.adobe.com/xdm/context/namespace",
"properties": {
"code": {
"meta:xdmField": "xdm:code",
"meta:xdmType": "string",
"description": "The code is a human readable identifier for the namespace and can be used to request the technical namespace id which is used for identity graph processing.",
"type": "string",
"title": "Code"
}
},
"meta:xdmType": "object",
"type": "object",
"description": "The namespace associated with the `xid` attribute.",
"title": "Namespace"
},
"_id": {
"meta:xdmField": "@id",
"meta:xdmType": "string",
"description": "Identity of the audience in the related namespace.",
"format": "uri-reference",
"type": "string",
"title": "Identifier"
}
},
"meta:xdmType": "object",
"type": "object",
"description": "The identity of the audience or snapshot definition in with the domain of the specific system that processes that type of segment. Deprecated.",
"meta:status": "deprecated",
"title": "Segment ID"
},
"profileStitchID": {
"meta:xdmField": "xdm:profileStitchID",
"meta:referencedFrom": "https://ns.adobe.com/xdm/context/profileStitchIdentity",
"properties": {
"xid": {
"meta:xdmField": "xdm:xid",
"meta:xdmType": "string",
"description": "When present, this value represents a cross-namespace identifier that is unique across all namespace-scoped identifiers in all namespaces.",
"type": "string",
"title": "Experience identifier"
},
"namespace": {
"meta:xdmField": "xdm:namespace",
"required": [
"code"
],
"meta:referencedFrom": "https://ns.adobe.com/xdm/context/namespace",
"properties": {
"code": {
"meta:xdmField": "xdm:code",
"meta:xdmType": "string",
"description": "The code is a human readable identifier for the namespace and can be used to request the technical namespace id which is used for identity graph processing.",
"type": "string",
"title": "Code"
}
},
"meta:xdmType": "object",
"type": "object",
"description": "The namespace associated with the `xid` attribute.",
"title": "Namespace"
},
"_id": {
"meta:xdmField": "@id",
"meta:xdmType": "string",
"description": "Identity of the profile stitch in the related namespace.",
"format": "uri-reference",
"type": "string",
"title": "Identifier"
}
},
"meta:xdmType": "object",
"type": "object"
},
"payload": {
"meta:xdmField": "xdm:payload",
"meta:xdmType": "object",
"required": [
"payloadType"
],
"properties": {
"payloadType": {
"meta:xdmField": "xdm:payloadType",
"meta:xdmType": "string",
"description": "The type of payload.",
"meta:enum": {
"string": "String",
"propensity": "Propensity",
"number": "Number",
"boolean": "Boolean"
},
"enum": [
"boolean",
"number",
"propensity",
"string"
],
"type": "string",
"title": "Payload Type"
},
"payloadStringValue": {
"meta:xdmField": "xdm:payloadStringValue",
"meta:xdmType": "string",
"description": "The string value.",
"type": "string",
"title": "Value"
},
"payloadPropensityValue": {
"meta:xdmField": "xdm:payloadPropensityValue",
"meta:xdmType": "number",
"maximum": 1,
"exclusiveMinimum": 0,
"description": "The propensity.",
"type": "number",
"title": "Value"
},
"payloadNumberValue": {
"meta:xdmField": "xdm:payloadNumberValue",
"meta:xdmType": "number",
"description": "The number.",
"type": "number",
"title": "Value"
},
"payloadBooleanValue": {
"meta:xdmField": "xdm:payloadBooleanValue",
"meta:xdmType": "boolean",
"description": "The boolean value.",
"type": "boolean",
"title": "Value"
}
},
"type": "object",
"description": "Values that are directly related with the audience realization. This payload exists with the same 'validUntil' as the audience realization. Note that the intention is that exactly one payload value be included, as indicated by the payload type. This was originally modeled using 'oneOf', but due to limitations in our tooling that was removed. This more semantically meaningful representation will be re-introduced in the future.",
"title": "Payload"
},
"lastQualificationTime": {
"meta:xdmField": "xdm:lastQualificationTime",
"meta:xdmType": "date-time",
"description": "The timestamp when the assertion of audience membership was made.",
"format": "date-time",
"type": "string",
"title": "Last qualification time"
}
},
"meta:xdmType": "object",
"type": "object"
},
"meta:xdmType": "map",
"type": "object",
"title": "Segment membership per namespace"
}
},
"attributes": {
"type": "object",
"meta:xdmType": "map",
"additionalProperties": {
"properties": {
"value": {
"type": "string",
"title": "Value"
}
},
"meta:xdmType": "object",
"type": "object"
}
},
"firstName": {
"title": "firstName",
"type": "string"
},
"Email": {
"title": "Email",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"title": "id",
"type": "string",
"meta:xdmType": "string"
}
},
"meta:xdmType": "object"
},
"meta:xdmType": "array"
}
}
}
}
响应中的ID表示您创建的输入架构的唯一标识符。 从响应中复制ID,因为您将在后续步骤中重复使用它。
创建映射集
接下来,使用数据准备API,使用输入架构ID、输出架构ID和所需的字段映射来创建映射集。
请求
- 在下面显示的映射对象中,
destination
参数不接受点"."
。 例如,您需要使用personalEmail_address或segmentMembership_status ,如配置示例中突出显示的内容所示。 - 当源属性是标识属性并包含点时,有一种特殊情况。 在这种情况下,属性需要使用
//
进行转义,如下面突出显示的那样。 - 另请注意,即使下面的示例配置包括
Email
和Phone_E.164
,您只能为每个数据流导出一个标识属性。
curl --location --request POST 'https://platform.adobe.io/data/foundation/conversion/mappingSets' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"inputSchema": {
"id": "81d7fc5376e54eb58d5186fd30d5a8c9"
},
"outputSchema": {
"id": "2f4fd51934c1409fb1d8207dd9f43dc9"
},
"mappings": [
{
"destination": "firstName",
"source": "person.name.firstName",
"sourceType": "ATTRIBUTE"
},
{
"destination": "Email",
"source": "identityMap.Email",
"sourceType": "ATTRIBUTE"
},
{
"destination": "Phone_E_164",
"source": "identityMap.Phone_E//.164",
"sourceType": "ATTRIBUTE"
},
{
"destination": "personalEmail_address",
"source": "personalEmail.address",
"sourceType": "ATTRIBUTE"
},
{
"destination": "segmentMembership_status",
"source": "segmentMembership.ups.seg_id.status",
"sourceType": "ATTRIBUTE"
}
],
"xdmVersion": "1.0"
}'
响应
{
"id": "5f0031f8ccd4444dac9c5c391389e9e8",
"version": 0,
"createdDate": 1678999005197,
"modifiedDate": 1678999005197,
"createdBy": "example@AdobeID",
"modifiedBy": "example@AdobeID"
}
记下映射集的ID,因为您将需要在下一步中使用映射集ID更新现有数据流。
接下来,获取要更新的数据流的ID。
有关检索数据流ID的信息,请参阅检索目标数据流的详细信息。
最后,您需要使用刚刚创建的映射集信息PATCH
数据流。
请求
curl --location --request PATCH 'https://platform.adobe.io/data/foundation/flowservice/flows/df8245a8-dd8f-42da-a04a-2d3a92654d9e' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'If-Match: ETAG_HERE' \
--data-raw '[
{
"op":"ADD",
"path":"/transformations/0/params/profileMapping",
"value":{
"mappingId":"304ca6a2fff244949c956cad1cd9eae6",
"mappingVersion":0
}
}
]'
响应
流服务API的响应将返回已更新数据流的ID。
{
"id": "1c246ae4-ba0d-43cd-a0ec-f16fe0a56b55",
"etag": "\"1500c67f-0000-0200-0000-64137ee00000\""
}
进行其他数据流更新
要对数据流进行任何更新,请使用PATCH
操作。 例如,您可以向数据流添加营销操作。 或者,您可以更新数据流以选择字段作为必需键或重复数据删除键。
添加营销操作
要添加营销操作,请参阅下面的请求和响应示例。
PATCH
请求时需要使用If-Match
标头。 此标头的值是要更新的数据流的唯一版本。 每次成功更新流实体(例如数据流、目标连接等)时,etag值都会更新。https://platform.adobe.io/data/foundation/flowservice/flows/{ID}
端点执行GET请求,其中{ID}
是您要更新的数据流ID。PATCH
请求时,请确保将If-Match
标头的值用双引号括起来,如以下示例中所示。请求
curl --location --request PATCH 'https://platform.adobe.io/data/foundation/flowservice/flows/{DATAFLOW_ID}' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'If-Match: "{ETAG_HERE}"' \
--data-raw '[
{
"op":"add",
"path":"/policy",
"value":{
"enforcementRefs":[
]
}
},
{
"op":"add",
"path":"/policy/enforcementRefs/-",
"value":"/dulepolicy/marketingActions/custom/6b935bc8-bb9e-451b-a327-0ffddfb91e66/constraints"
}
]'
响应
成功的响应将返回响应代码200
以及更新数据流的ID和更新的eTag。
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
添加必需键
要添加必需键,请参阅下面的请求和响应示例。
PATCH
请求时需要使用If-Match
标头。 此标头的值是要更新的数据流的唯一版本。 每次成功更新流实体(例如数据流、目标连接等)时,etag值都会更新。https://platform.adobe.io/data/foundation/flowservice/flows/{ID}
端点执行GET请求,其中{ID}
是您要更新的数据流ID。PATCH
请求时,请确保将If-Match
标头的值用双引号括起来,如以下示例中所示。请求
curl --location --request PATCH 'https://platform.adobe.io/data/foundation/flowservice/flows/{DATAFLOW_ID}' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'If-Match: "{ETAG_HERE}"' \
--data-raw '
[
{
"op": "add",
"path": "/transformations/0/params/mandatoryFields",
"value": [
"GAID"
]
}
]'
curl --location --request PATCH 'https://platform.adobe.io/data/foundation/flowservice/flows/{DATAFLOW_ID}' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'If-Match: "{ETAG_HERE}"' \
--data-raw '
[
{
"op": "add",
"path": "/transformations/0/params/mandatoryFields",
"value": [
"GAID"
]
}
]'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
添加重复数据删除键
要添加重复数据删除键,请参阅下面的请求和响应示例
PATCH
请求时需要使用If-Match
标头。 此标头的值是要更新的数据流的唯一版本。 每次成功更新流实体(例如数据流、目标连接等)时,etag值都会更新。https://platform.adobe.io/data/foundation/flowservice/flows/{ID}
端点执行GET请求,其中{ID}
是您要更新的数据流ID。PATCH
请求时,请确保将If-Match
标头的值用双引号括起来,如以下示例中所示。请求
curl --location --request PATCH 'https://platform.adobe.io/data/foundation/flowservice/flows/{DATAFLOW_ID}' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'If-Match: "{ETAG_HERE}"' \
--data-raw '
[
{
"op": "add",
"path": "/transformations/0/params/primaryFields",
"value": [
{
"identityNamespace": "GAID",
"fieldType": "IDENTITY"
}
]
}
]'
curl --location --request PATCH 'https://platform.adobe.io/data/foundation/flowservice/flows/{DATAFLOW_ID}' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'If-Match: "{ETAG_HERE}"' \
--data-raw '
[
{
"op": "add",
"path": "/transformations/0/params/primaryFields",
"value": [
{
"identityNamespace": "GAID",
"fieldType": "IDENTITY"
}
]
}
]'
响应
{
"id": "eb54b3b3-3949-4f12-89c8-64eafaba858f",
"etag": "\"0000d781-0000-0200-0000-63e29f420000\""
}
验证数据流(获取数据流运行)
要检查数据流的执行,请使用数据流运行API:
请求
curl --location --request GET 'https://platform.adobe.io/data/foundation/flowservice/runs?property=flowId==eb54b3b3-3949-4f12-89c8-64eafaba858f' \
--header 'accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-raw ''
响应
{
"items": [
{
"id": "4b7728dd-83c9-4c38-95a4-24ddab545404",
"createdAt": 1675807718296,
"updatedAt": 1675807731834,
"createdBy": "aep_activation_batch@AdobeID",
"updatedBy": "acp_foundation_connectors@AdobeID",
"createdClient": "aep_activation_batch",
"updatedClient": "acp_foundation_connectors",
"sandboxId": "7dfdcd30-0a09-11ea-8ea6-7bf93ce86c28",
"sandboxName": "sand-1",
"imsOrgId": "5555467B5D8013E50A494220@AdobeOrg",
"flowId": "aae5ec63-b0ac-4808-9a44-abf2ea67bd5a",
"flowSpec": {
"id": "615d3489-36d2-4671-9467-4ae1129facd3",
"version": "1.0"
},
"providerRefId": "ba56f98e0c49b572adb249980c39b1c7",
"etag": "\"08005e9e-0000-0200-0000-63e2cbf30000\"",
"metrics": {
"durationSummary": {
"startedAtUTC": 1675807719411,
"completedAtUTC": 1675807719416
},
"sizeSummary": {
"inputBytes": 0
},
"recordSummary": {
"inputRecordCount": 0,
"skippedRecordCount": 0,
"sourceSummaries": [
{
"id": "ea2b1205-4692-49de-b448-ebf75b1d188a",
"inputRecordCount": 0,
"skippedRecordCount": 0,
"entitySummaries": [
{
//...