다음 /rpc/import
의 엔드포인트 Schema Registry API를 사용하면 생성된 내보내기 페이로드에서 XDM(Experience Data Model) 리소스를 만들 수 있습니다. 내보내기 페이로드는 다음 두 소스에서 생성할 수 있습니다.
/rpc/export
엔드포인트 기존 XDM 리소스에서 내보내기 페이로드를 생성하므로 샌드박스 간에 리소스를 공유할 수 있습니다./rpc/csv2schema
엔드포인트 csv 템플릿에서 내보내기 페이로드를 만듭니다.내보내기 페이로드를 만들면 /rpc/import
선택한 샌드박스에서 리소스(및 모든 종속 리소스)를 생성하는 끝점입니다.
다음 /rpc/import
엔드포인트는 Schema Registry API. 계속하기 전에 시작 안내서 관련 설명서에 대한 링크의 경우, 이 문서에서 샘플 API 호출을 읽는 안내서와 Experience Platform API를 성공적으로 호출하는 데 필요한 필수 헤더에 대한 중요 정보를 제공합니다.
다음 /rpc/import
끝점은 RPC(원격 프로시저 호출)에서 지원하는 일부입니다 Schema Registry. 의 다른 종단점과 달리 Schema Registry API, RPC 끝점은 다음과 같은 추가 헤더가 필요하지 않습니다. Accept
또는 Content-Type
, 및 를 사용하지 않음 CONTAINER_ID
. 대신 를 사용해야 합니다 /rpc
네임스페이스에 대해 자세히 알아보십시오.
XDM 리소스에 대한 내보내기 페이로드를 생성했으면 POST 요청에서 해당 페이로드를 /import
target 조직 및 샌드박스로 해당 리소스를 가져오는 종단점입니다.
API 형식
POST /rpc/import
요청
다음 요청은 호출에서 반환된 페이로드를 /rpc/export
엔드포인트 필드 그룹을 가져오려면 (Restaurant
)을 새로운 조직 및 샌드박스에 추가하고, x-gw-ims-org-id
및 x-sandbox-name
헤더 를 각각 입력합니다.
curl -X POST \
https://platform.adobe.io/data/foundation/schemaregistry/rpc/import \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '[
{
"$id": "https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/datatypes/fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495",
"meta:altId": "_<XDM_TENANTID_PLACEHOLDER>.datatypes.fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495",
"meta:resourceType": "datatypes",
"version": "1.0",
"title": "Property",
"type": "object",
"description": "",
"definitions": {
"customFields": {
"properties": {
"propertyId": {
"title": "Property ID",
"description": "ID for a company-owned property.",
"type": "string",
"isRequired": false,
"meta:ui": {
"ref": [
"schema://5fbc29ec292534000055dd55",
"#/definitions/customFields"
],
"path": "{}._<XDM_TENANTID_PLACEHOLDER>{}.property{}.propertyId",
"editable": true,
"generateDate": 1606168175975
},
"meta:xdmType": "string"
},
"jurisdiction": {
"title": "Jurisdiction",
"description": "",
"type": "string",
"isRequired": false,
"enum": [
"NA",
"UK",
"EU"
],
"meta:enum": {
"NA": "North America",
"UK": "United Kingdom",
"EU": "European Union"
},
"meta:ui": {
"ref": [
"schema://5fbc29ec292534000055dd55",
"#/definitions/customFields"
],
"path": "{}._<XDM_TENANTID_PLACEHOLDER>{}.property{}.jurisdiction",
"editable": true,
"generateDate": 1606168175975
},
"meta:xdmType": "string"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/customFields",
"type": "object",
"meta:xdmType": "object"
}
],
"meta:extensible": true,
"meta:abstract": true,
"meta:xdmType": "object",
"meta:sandboxId": "ff0f6870-c46d-11e9-8ca3-036939a64204",
"meta:sandboxType": "production"
},
{
"$id": "https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/mixins/922a56b58c6b4e4aeb49e577ec82752106ffe8971b23b4d9",
"meta:altId": "_<XDM_TENANTID_PLACEHOLDER>.mixins.922a56b58c6b4e4aeb49e577ec82752106ffe8971b23b4d9",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Restaurant",
"type": "object",
"description": "",
"definitions": {
"customFields": {
"type": "object",
"properties": {
"_<XDM_TENANTID_PLACEHOLDER>": {
"type": "object",
"properties": {
"capacity": {
"title": "Capacity",
"description": "Restaurant capacity",
"type": "string",
"isRequired": false,
"meta:xdmType": "string"
},
"kitchen": {
"title": "Kitchen Style",
"description": "Style of kitchen",
"type": "string",
"isRequired": false,
"meta:xdmType": "string"
},
"rating": {
"title": "Rating",
"description": "",
"type": "integer",
"isRequired": false,
"meta:xdmType": "int"
},
"property": {
"title": "Property",
"description": "",
"$ref": "https://ns.adobe.com/<XDM_TENANTID_PLACEHOLDER>/datatypes/fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495",
"type": "object",
"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": "ff0f6870-c46d-11e9-8ca3-036939a64204",
"meta:sandboxType": "production"
}
]'
응답
성공적인 응답은 해당 테넌트 ID 및 IMS 조직 값이 적용된 가져온 리소스 목록을 반환합니다.
[
{
"$id": "https://ns.adobe.com/{TENANT_ID}/datatypes/fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495",
"meta:altId": "_{TENANT_ID}.datatypes.fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495",
"meta:resourceType": "datatypes",
"version": "1.0",
"title": "Property",
"type": "object",
"description": "",
"definitions": {
"customFields": {
"properties": {
"propertyId": {
"title": "Property ID",
"description": "ID for a company-owned property.",
"type": "string",
"isRequired": false,
"meta:ui": {
"ref": [
"schema://5fbc29ec292534000055dd55",
"#/definitions/customFields"
],
"path": "{}._{TENANT_ID}{}.property{}.propertyId",
"editable": true,
"generateDate": 1606168175975
},
"meta:xdmType": "string"
},
"jurisdiction": {
"title": "Jurisdiction",
"description": "",
"type": "string",
"isRequired": false,
"enum": [
"NA",
"UK",
"EU"
],
"meta:enum": {
"NA": "North America",
"UK": "United Kingdom",
"EU": "European Union"
},
"meta:ui": {
"ref": [
"schema://5fbc29ec292534000055dd55",
"#/definitions/customFields"
],
"path": "{}._{TENANT_ID}{}.property{}.jurisdiction",
"editable": true,
"generateDate": 1606168175975
},
"meta:xdmType": "string"
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/customFields",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1606250624257,
"repo:lastModifiedDate": 1606250624257,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "9dadfaf8168af30eae1a745de95eace760680cfc9a69bcc938f68fe3caf57317",
"meta:globalLibVersion": "1.16.3"
},
"meta:containerId": "tenant",
"meta:sandboxId": "52c8dbe0-ced2-11e9-a524-cd79ba95ea3a",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
},
{
"$id": "https://ns.adobe.com/{TENANT_ID}/mixins/922a56b58c6b4e4aeb49e577ec82752106ffe8971b23b4d9",
"meta:altId": "_{TENANT_ID}.mixins.922a56b58c6b4e4aeb49e577ec82752106ffe8971b23b4d9",
"meta:resourceType": "mixins",
"version": "1.0",
"title": "Restaurant",
"type": "object",
"description": "",
"definitions": {
"customFields": {
"type": "object",
"properties": {
"_{TENANT_ID}": {
"type": "object",
"properties": {
"capacity": {
"title": "Capacity",
"description": "Restaurant capacity",
"type": "string",
"isRequired": false,
"meta:xdmType": "string"
},
"kitchen": {
"title": "Kitchen Style",
"description": "Style of kitchen",
"type": "string",
"isRequired": false,
"meta:xdmType": "string"
},
"rating": {
"title": "Rating",
"description": "",
"type": "integer",
"isRequired": false,
"meta:xdmType": "int"
},
"property": {
"title": "Property",
"description": "",
"$ref": "https://ns.adobe.com/{TENANT_ID}/datatypes/fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495",
"type": "object",
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
},
"meta:xdmType": "object"
}
},
"allOf": [
{
"$ref": "#/definitions/customFields",
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
"https://ns.adobe.com/{TENANT_ID}/datatypes/fc07162ee7ca8d18e074a3bb50c3938c76160bf6040e8495"
],
"imsOrg": "{ORG_ID}",
"meta:extensible": true,
"meta:abstract": true,
"meta:intendedToExtend": [],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1606250624357,
"repo:lastModifiedDate": 1606250624357,
"xdm:createdClientId": "{CLIENT_ID}",
"xdm:lastModifiedClientId": "{CLIENT_ID}",
"xdm:createdUserId": "{USER_ID}",
"xdm:lastModifiedUserId": "{USER_ID}",
"eTag": "5a5401ba8e6845b2f42d330002331e6e96c031c4e228f860423a3d5cd3598b40",
"meta:globalLibVersion": "1.16.3"
},
"meta:containerId": "tenant",
"meta:sandboxId": "52c8dbe0-ced2-11e9-a524-cd79ba95ea3a",
"meta:sandboxType": "production",
"meta:tenantNamespace": "_{TENANT_ID}"
}
]