データをAdobe Experience Platformに取り込むには、データの形式と構造が既存の Experience Data Model(XDM) スキーマに準拠している必要があります。 特定のデータセットのスキーマが複雑な場合は、取得時にデータセットが予想するデータの正確な形状を判断するのが困難な場合があります。
の使用 /sampledata
エンドポイント Schema Registry API を使用すると、以前に作成した任意のスキーマのサンプル取り込みオブジェクトを生成できます。
このガイドで使用するエンドポイントは、Schema Registry API の一部です。先に進む前に、はじめる前にを参照し、関連ドキュメントへのリンク、このドキュメントのサンプル API 呼び出しを読み取るためのガイドおよび任意の Experience Platform API を正常に呼び出すために必要なヘッダーに関する重要な情報を確認してください。
サンプルデータエンドポイントは、 Schema Registry. の他のエンドポイントとは異なり、 Schema Registry API、RPC エンドポイントは、 Accept
または Content-Type
、およびを使用しない CONTAINER_ID
. 代わりに、 /rpc
名前空間と呼ばれます。
エンドポイントへの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"
}