範例資料端點
若要將資料內嵌至Adobe Experience Platform,資料的格式和結構必須符合現有的Experience Data Model (XDM)結構。 根據特定資料集的結構描述複雜性,可能很難判斷資料集在擷取時預期的資料確切形狀。
使用 /sampledata
中的端點 Schema Registry API的環境中,您可以為先前建立的任何結構描述產生範例擷取物件。
快速入門
本指南中使用的端點是 Schema Registry API. 在繼續之前,請檢閱 快速入門手冊 如需相關檔案的連結,請參閱本檔案範例API呼叫的閱讀指南,以及有關成功呼叫任何Experience PlatformAPI所需必要標題的重要資訊。
範例資料端點是 Schema Registry. 不像 Schema Registry API、RPC端點不需要其他標頭,例如 Accept
或 Content-Type
,且請勿使用 CONTAINER_ID
. 相反地,他們必須使用 /rpc
名稱空間,如下面的API呼叫所示。
擷取結構描述的範例資料
您可以在端點的GET要求路徑中指定結構描述的ID,以擷取結構描述資料庫中任何結構的範例資料。
API格式
GET /rpc/sampledata/{SCHEMA_ID}
參數
說明
{SCHEMA_ID}
此
meta:altId
或URL編碼 $id
要為其產生範例資料的結構描述。要求
下列請求會產生「忠誠會員」結構的範例資料。
curl -X GET \
https://platform.adobe.io/data/foundation/schemaregistry/rpc/sampledata/_{TENANT_ID}.schemas.533ca5da28087c44344810891b0f03d9 \
-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}'
回應
成功的回應會傳回指定之結構描述的範例資料物件。
{
"@id": "/uri-reference",
"_{TENANT_ID}": {
"favoriteHotel": "string",
"loyalty": {
"loyaltyId": "string",
"loyaltyLevel": "string",
"loyaltyPoints": 4862,
"memberSince": "2018-11-12T20:20:39+00:00"
}
},
"repo:createDate": "2004-10-23T12:00:00-06:00",
"repo:modifyDate": "2004-10-23T12:00:00-06:00",
"xdm:createdByBatchID": "/uri-reference",
"xdm:faxPhone": {
"xdm:extension": "string",
"xdm:number": "string",
"xdm:primary": false,
"xdm:status": "active",
"xdm:statusReason": "string",
"xdm:validity": "consistent"
},
"xdm:homeAddress": {
"@id": "/uri-reference",
"repo:createDate": "2004-10-23T12:00:00-06:00",
"repo:modifyDate": "2004-10-23T12:00:00-06:00",
"schema:description": "string",
"schema:elevation": 31148.05,
"schema:latitude": 29.25,
"schema:longitude": -145.42,
"xdm:city": "string",
"xdm:country": "string",
"xdm:countryCode": "US",
"xdm:createdByBatchID": "/uri-reference",
"xdm:dmaID": 1612,
"xdm:label": "string",
"xdm:lastVerifiedDate": "2018-01-12",
"xdm:modifiedByBatchID": "/uri-reference",
"xdm:msaID": 26375,
"xdm:postOfficeBox": "string",
"xdm:postalCode": "string",
"xdm:primary": false,
"xdm:region": "string",
"xdm:repositoryCreatedBy": "string",
"xdm:repositoryLastModifiedBy": "string",
"xdm:state": "string",
"xdm:stateProvince": "US-CA",
"xdm:status": "active",
"xdm:statusReason": "string",
"xdm:street1": "string",
"xdm:street2": "string",
"xdm:street3": "string",
"xdm:street4": "string"
},
"xdm:homePhone": {
"xdm:extension": "string",
"xdm:number": "string",
"xdm:primary": false,
"xdm:status": "active",
"xdm:statusReason": "string",
"xdm:validity": "consistent"
},
"xdm:identityMap": {
"key": [
{
"xdm:authenticatedState": "ambiguous",
"xdm:id": "string",
"xdm:primary": false
}
]
},
"xdm:mobilePhone": {
"xdm:extension": "string",
"xdm:number": "string",
"xdm:primary": false,
"xdm:status": "active",
"xdm:statusReason": "string",
"xdm:validity": "consistent"
},
"xdm:modifiedByBatchID": "/uri-reference",
"xdm:person": {
"xdm:birthDate": "2018-01-12",
"xdm:birthDayAndMonth": "01-23",
"xdm:birthYear": 6427,
"xdm:gender": "not_specified",
"xdm:maritalStatus": "not_specified",
"xdm:name": {
"xdm:courtesyTitle": "string",
"xdm:firstName": "string",
"xdm:fullName": "string",
"xdm:lastName": "string",
"xdm:middleName": "string",
"xdm:suffix": "string"
},
"xdm:nationality": "US",
"xdm:taxId": "string"
},
"xdm:personalEmail": {
"xdm:address": "john.smith@abc.com",
"xdm:label": "string",
"xdm:primary": false,
"xdm:status": "active",
"xdm:statusReason": "string",
"xdm:type": "unknown"
},
"xdm:repositoryCreatedBy": "string",
"xdm:repositoryLastModifiedBy": "string"
}
recommendation-more-help
62e9ffd9-1c74-4cef-8f47-0d00af32fc07