結構資料庫中的所有資源都包含在IMS組織內的特定沙箱中。 在某些情況下,您可能會想在沙箱與IMS組織之間共用Experience Data Model(XDM)資源。
為了滿足此需求,Adobe Experience Platform UI的結構工作區可讓您為結構資料庫中的任何結構產生匯出裝載。 接著,此裝載便可用於呼叫結構註冊表API,以將結構(以及所有相依資源)匯入目標沙箱和IMS組織。
除了結構(包括類、結構欄位組和資料類型)外,您還可以使用結構註冊表API導出其他資源。 如需詳細資訊,請參閱匯出/匯入端點上的指南。
雖然Platform UI可讓您匯出XDM資源,但您必須使用「結構註冊表API」將這些資源匯入其他沙箱或IMS組織,才能完成工作流程。 在遵循本指南之前,請參閱架構註冊表API快速入門手冊,以取得有關必要驗證標題的重要資訊。
在Platform UI中,選取左側導覽中的結構。 在結構工作區中,找出要匯出的結構,並在Schema Editor中開啟。
如需如何尋找您正在尋找的XDM資源的詳細資訊,請參閱探索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🔗中關於匯入XDM資源的區段。
依照本指南,您已成功將XDM結構匯出至不同的IMS組織或沙箱。 有關結構 UI功能的詳細資訊,請參閱結構 UI概述。