架構程式庫中的所有資源都包含在IMS組織內的特定沙盒中。 在某些情況下,您可能會想在沙盒和IMS組織之間共用「體驗資料模型」(XDM)資源。
為了滿足此需求,Adobe Experience Platform UI中的結構描述工作區可讓您為結構描述庫中的任何結構描述產生匯出裝載。 然後,此裝載可用於對架構註冊表API的呼叫,以將架構(及所有相依資源)匯入目標沙盒和IMS組織。
您也可以使用「方案註冊表API」來匯出其他資源,以及方案,包括類別、混合和資料類型。 如需詳細資訊,請參閱匯出/匯入端點上的指南。
雖然平台UI可讓您匯出XDM資源,但您必須使用架構註冊表API將這些資源匯入其他沙盒或IMS組織,以完成工作流程。 在遵循本指南之前,請參閱快速入門手冊中的「架構註冊表API」,以取得有關必要驗證標題的重要資訊。
在平台UI中,選擇左側導航中的方案。 在方案工作區中,找到要導出的方案並在Schema Editor中將其開啟。
有關如何查找所查找的XDM資源的詳細資訊,請參見中的指南。
當您開啟結構描述後,請選取畫布右上角的複製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": [
]
}
]
裝載採用陣列的形式,每個陣列項都是表示要導出的自定義XDM資源的對象。 在上述範例中,「Loyalty details」自訂混音和「Loyalty Members」結構包含在內。 匯出中不會包含架構採用的任何核心資源,因為這些資源可用於所有沙盒和IMS組織。
請注意,您組織的租用戶ID的每個例項在裝載中會顯示為<XDM_TENANTID_PLACEHOLDER>
。 這些預留位置會自動取代為適當的租用戶ID值,這取決於您在下一步驟中匯入架構的位置。
複製結構的匯出JSON後,您就可將它當做POST要求的裝載,用於結構註冊表API的/import
端點。 如需如何設定呼叫,將結構傳送至所需IMS組織與沙盒的詳細資訊,請參閱API](/docs/experience-platform/xdm/api/export-import.html?lang=zh-Hant#import)中有關匯入XDM資源的章節。[
依照本指南,您已成功將XDM架構匯出至不同的IMS組織或沙盒。 有關方案 UI功能的詳細資訊,請參閱方案 UI概述。