在 UI 中导出 XDM 架构
创建对象:
- 开发人员
架构库中的所有资源都包含在组织内的特定沙盒中。 在某些情况下,您可能希望在沙盒和组织之间共享Experience Data Model (XDM)资源。
为了满足此需求,Adobe Experience Platform UI中的架构工作区允许您为架构库中的任何架构生成导出有效负载。 然后,可以在调用架构注册表API中使用此有效负载,将架构(以及所有依赖的资源)导入目标沙盒和组织。
先决条件
虽然Experience Platform UI允许您导出XDM资源,但必须使用架构注册表API将这些资源导入其他沙盒或组织以完成工作流。 在遵循本指南之前,请参阅架构注册表API快速入门指南,以了解有关所需身份验证标头的重要信息。
生成导出有效负载
可以在Experience Platform UI中通过浏览选项卡中的详细信息面板生成导出负载,也可以直接从架构编辑器的架构画布生成导出负载。
要生成导出有效负载,请在左侧导航中选择 架构。 在架构工作区中,选择要导出的架构的行以在右侧边栏中显示架构详细信息。
接下来,从可用选项中选择 复制JSON 图标(
这会将JSON有效负载复制到剪贴板,该剪贴板是基于架构结构生成的。 对于上面显示的“Loyalty Members”架构,会生成以下JSON:
[
{
"$id": "https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/mixins/9ecfd881d0053568d277b792e4d24c6b70ffa7782bd31265",
"meta:altId": "_<XDM_TENANTID_PLACEHOLDER>.mixins.9ecfd881d0053568d277b792e4d24c6b70ffa7782bd31265",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Loyalty details",
"type": "object",
"description": "",
"definitions": {
"customFields": {
"type": "object",
"properties": {
"_<XDM_TENANTID_PLACEHOLDER>": {
"type": "object",
"properties": {
"loyalty": {
"title": "Loyalty",
"description": "",
"type": "object",
"isRequired": false,
"required": [
],
"properties": {
"loyaltyId": {
"title": "Loyalty ID",
"description": "",
"type": "string",
"isRequired": false,
"required": [
],
"meta:xdmType": "string"
},
"memberSince": {
"title": "Member Since",
"description": "",
"type": "string",
"isRequired": false,
"required": [
],
"format": "date",
"meta:xdmType": "date"
},
"points": {
"title": "Points",
"description": "",
"type": "integer",
"isRequired": false,
"required": [
],
"meta:xdmType": "int"
},
"loyaltyLevel": {
"title": "Loyalty Level",
"description": "",
"type": "string",
"isRequired": false,
"required": [
],
"enum": [
"platinum",
"gold",
"silver",
"bronze"
],
"meta:enum": {
"platinum": "Platinum",
"gold": "Gold",
"silver": "Silver",
"bronze": "Bronze"
},
"meta:xdmType": "string"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
},
"allOf": [
{
"$ref": "#/definitions/customFields",
"type": "object",
"meta:xdmType": "object"
}
],
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [
],
"meta:xdmType": "object",
"meta:sandboxId": "1bd86660-c5da-11e9-93d4-6d5fc3a66a8e",
"meta:sandboxType": "production"
},
{
"$id": "https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/schemas/1e5a739ded8fd1d766a0e06e881a38031874dddd1c7020ad",
"meta:altId": "_<XDM_TENANTID_PLACEHOLDER>.schemas.1e5a739ded8fd1d766a0e06e881a38031874dddd1c7020ad",
"meta:resourceType": "schemas",
"version": "1.4",
"title": "Loyalty Members",
"type": "object",
"description": "Describes customers who are members of a loyalty program.",
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/context/profile",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-person-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/context/profile-personal-details",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/mixins/9ecfd881d0053568d277b792e4d24c6b70ffa7782bd31265",
"type": "object",
"meta:xdmType": "object"
},
{
"$ref": "https://ns.adobe.com/xdm/mixins/profile-consents",
"type": "object",
"meta:xdmType": "object"
}
],
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
"https://ns.adobe.com/xdm/context/profile-person-details",
"https://ns.adobe.com/xdm/context/profile-personal-details",
"https://ns.adobe.com/xdm/common/auditable",
"https://ns.adobe.com/xdm/data/record",
"https://ns.adobe.com/xdm/context/profile",
"https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/mixins/9ecfd881d0053568d277b792e4d24c6b70ffa7782bd31265",
"https://ns.adobe.com/xdm/mixins/profile-consents"
],
"meta:xdmType": "object",
"meta:class": "https://ns.adobe.com/xdm/context/profile",
"meta:sandboxId": "1bd86660-c5da-11e9-93d4-6d5fc3a66a8e",
"meta:sandboxType": "production",
"meta:immutableTags": [
]
}
]
通过选择架构编辑器右上角的More,还可以复制有效负载。 下拉菜单提供两个选项:复制JSON结构和删除架构。
有效负载采用数组的形式,每个数组项都是一个对象,表示要导出的自定义XDM资源。 在上述示例中,包括“Loyalty details”自定义字段组和“Loyalty Members”架构。 架构使用的任何核心资源都不会包含在导出中,因为这些资源在所有沙盒和组织中都可用。
请注意,您组织的租户ID的每个实例在有效负载中显示为<XDM_TENANTID_PLACEHOLDER>
。 这些占位符将自动替换为相应的租户ID值,具体取决于您在下一步中导入架构的位置。