根據來源結構描述產生範例設定檔 sample-profile-api-operations
https://platform.adobe.io/data/core/activation/authoring/sample-profiles
此頁面列出並描述您可以使用執行的所有API作業。 /authoring/sample-profiles
api端點。
為不同的API產生不同的設定檔型別 different-profiles-different-apis
- 產生設定檔以用於 製作和測試訊息轉換範本 — 使用 目的地ID 作為查詢引數。
- 產生設定檔,以在對進行呼叫時使用 測試您的目的地是否已正確設定 — 使用 目的地執行個體識別碼 作為查詢引數。
您可以根據AdobeXDM來源結構描述(用於測試您的目的地)或目的地支援的目標結構描述(用於製作範本)來產生範例設定檔。 若要瞭解AdobeXDM來源結構描述和目標結構描述之間的差異,請閱讀 訊息格式 文章。
請注意,範例設定檔的使用目的不可互換。 根據以下專案產生的設定檔: 目的地ID 只能用於製作您的訊息轉換範本,以及根據 目的地執行個體識別碼 僅可用於測試您的目的地端點。
範例設定檔產生API操作快速入門 get-started
在繼續之前,請檢閱 快速入門手冊 如需您成功呼叫API所需的重要資訊,包括如何取得必要的目的地撰寫許可權和必要的標頭。
根據測試目的地時使用的來源結構描述產生範例設定檔 generate-sample-profiles-source-schema
您可以向以下發出GET請求,根據來源結構描述產生範例設定檔: authoring/sample-profiles/
端點,並提供您根據要測試的目的地設定而建立的目的地執行個體的ID。
若要取得目的地執行個體的ID,您必須先在Experience PlatformUI中建立與目的地的連線,才能嘗試測試您的目的地。 閱讀 啟用目的地教學課程 以及如何取得要用於此API的目的地例項ID,請參閱以下秘訣。
- 若要使用此API,您在Experience PlatformUI中必須有與目的地的現有連線。 讀取 連線到目的地 和 對目的地啟用設定檔和對象 以取得詳細資訊。
- 建立與目的地的連線後,請在以下情況下取得您應在對此端點的API呼叫中使用的目的地執行個體ID: 瀏覽與目的地的連線.
API格式
GET authoring/sample-profiles?destinationInstanceId={DESTINATION_INSTANCE_ID}&count={COUNT}
{DESTINATION_INSTANCE_ID}
{COUNT}
1 - 1000
.如果未指定count引數,則產生的設定檔預設數量會由
maxUsersPerRequest
中的值 目的地伺服器設定. 如果此屬性未定義,則Adobe將產生一個範例設定檔。要求
以下請求會產生範例設定檔,由 {DESTINATION_INSTANCE_ID}
和 {COUNT}
查詢引數。
curl --location --request GET 'https://platform.adobe.io/data/core/activation/authoring/sample-profiles?destinationInstanceId=49966037-32cd-4457-a105-2cbf9c01826a&count=3' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
回應
成功的回應會傳回HTTP狀態200,其中包含指定數量的範例設定檔,以及與來源XDM結構描述對應的對象成員資格、身分和設定檔屬性。
[
{
"segmentMembership": {
"ups": {
"03fb9938-8537-4b4c-87f9-9c4d413a0ee5": {
"lastQualificationTime": "2021-06-30T18:40:07.591378Z",
"status": "realized"
},
"27e05542-d6a3-46c7-9c8e-d59d50229530": {
"lastQualificationTime": "2021-06-30T18:40:07.591380Z",
"status": "realized"
}
}
},
"personalEmail": {
"address": "john.smith@abc.com"
},
"identityMap": {
"ECID": [
{
"id": "ECID-7VEsJ"
}
]
},
"person": {
"name": {
"firstName": "string"
}
}
},
{
"segmentMembership": {
"ups": {
"03fb9938-8537-4b4c-87f9-9c4d413a0ee5": {
"lastQualificationTime": "2021-06-30T18:40:07.591378Z",
"status": "realized"
},
"27e05542-d6a3-46c7-9c8e-d59d50229530": {
"lastQualificationTime": "2021-06-30T18:40:07.591380Z",
"status": "realized"
}
}
},
"personalEmail": {
"address": "john.smith@abc.com"
},
"identityMap": {
"ECID": [
{
"id": "ECID-Y55JJ"
}
]
},
"person": {
"name": {
"firstName": "string"
}
}
},
{
"segmentMembership": {
"ups": {
"03fb9938-8537-4b4c-87f9-9c4d413a0ee5": {
"lastQualificationTime": "2021-06-30T18:40:07.591378Z",
"status": "realized"
},
"27e05542-d6a3-46c7-9c8e-d59d50229530": {
"lastQualificationTime": "2021-06-30T18:40:07.591380Z",
"status": "realized"
}
}
},
"personalEmail": {
"address": "john.smith@abc.com"
},
"identityMap": {
"ECID": [
{
"id": "ECID-Nd9GK"
}
]
},
"person": {
"name": {
"firstName": "string"
}
}
}
]
segmentMembership
segmentMembership
,讀取 對象成員資格詳細資料.lastQualificationTime
xdm:status
字串欄位,指出是否已在目前請求中實現對象成員資格。 接受下列值:
realized
:設定檔是區段的一部分。exited
:設定檔會隨著目前請求退出對象。
identityMap
identityMap
,讀取 結構描述組合的基礎.根據建立訊息轉換範本時使用的目標結構描述產生範例設定檔 generate-sample-profiles-target-schema
GET您可以根據目標結構描述產生範例設定檔,向 authoring/sample-profiles/
端點,並提供您建立範本時根據之目的地設定的目的地ID。
- 您應在此使用的目的地ID為
instanceId
對應至目的地組態,建立目的地組態時所用的是/destinations
端點。 請參閱 擷取目的地設定 以取得更多詳細資料。
API格式
GET authoring/sample-profiles?destinationId={DESTINATION_ID}&count={COUNT}
{DESTINATION_ID}
{COUNT}
1 - 1000
.如果未指定count引數,則產生的設定檔預設數量會由
maxUsersPerRequest
中的值 目的地伺服器設定. 如果此屬性未定義,則Adobe將產生一個範例設定檔。要求
以下請求會產生範例設定檔,由 {DESTINATION_ID}
和 {COUNT}
查詢引數。
curl --location --request GET 'https://platform.adobe.io/data/core/activation/authoring/sample-profiles?destinationId=49966037-32cd-4457-a105-2cbf9c01826a&count=3' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-api-key: {API_KEY}' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'x-gw-ims-org-id: {ORG_ID}' \
--header 'x-sandbox-name: {SANDBOX_NAME}' \
回應
成功的回應會傳回HTTP狀態200,其中包含指定數量的範例設定檔,以及與目標XDM結構描述相對應的對象成員資格、身分和設定檔屬性。
[
{
"segmentMembership": {
"ups": {
"segmentid1": {
"lastQualificationTime": "2021-06-30T18:42:27.609326Z",
"status": "realized"
},
"segmentid3": {
"lastQualificationTime": "2021-06-30T18:42:27.609328Z",
"status": "exited"
},
"segmentid2": {
"lastQualificationTime": "2021-06-30T18:42:27.609328Z",
"status": "realized"
}
}
},
"identityMap": {
"phone_sha256": [
{
"id": "phone_sha256-vizii"
}
],
"gaid": [
{
"id": "gaid-adKYs"
}
],
"idfa": [
{
"id": "idfa-t4sKv"
}
],
"extern_id": [
{
"id": "extern_id-C3enB"
}
],
"email_lc_sha256": [
{
"id": "email_lc_sha256-bfnbs"
}
]
}
},
{
"segmentMembership": {
"ups": {
"segmentid1": {
"lastQualificationTime": "2021-06-30T18:42:27.609626Z",
"status": "realized"
},
"segmentid3": {
"lastQualificationTime": "2021-06-30T18:42:27.609627Z",
"status": "exited"
},
"segmentid2": {
"lastQualificationTime": "2021-06-30T18:42:27.609627Z",
"status": "realized"
}
}
},
"identityMap": {
"phone_sha256": [
{
"id": "phone_sha256-6YjGc"
}
],
"gaid": [
{
"id": "gaid-SfJ21"
}
],
"idfa": [
{
"id": "idfa-eQMWS"
}
],
"extern_id": [
{
"id": "extern_id-d3WzP"
}
],
"email_lc_sha256": [
{
"id": "email_lc_sha256-eWfFn"
}
]
}
},
{
"segmentMembership": {
"ups": {
"segmentid1": {
"lastQualificationTime": "2021-06-30T18:42:27.609823Z",
"status": "realized"
},
"segmentid3": {
"lastQualificationTime": "2021-06-30T18:42:27.609824Z",
"status": "exited"
},
"segmentid2": {
"lastQualificationTime": "2021-06-30T18:42:27.609824Z",
"status": "realized"
}
}
},
"identityMap": {
"phone_sha256": [
{
"id": "phone_sha256-2PMjZ"
}
],
"gaid": [
{
"id": "gaid-3aLez"
}
],
"idfa": [
{
"id": "idfa-D2H1J"
}
],
"extern_id": [
{
"id": "extern_id-i6PsF"
}
],
"email_lc_sha256": [
{
"id": "email_lc_sha256-VPUtZ"
}
]
}
}
]
API錯誤處理 api-error-handling
Destination SDK API端點遵循一般Experience Platform API錯誤訊息原則。 請參閱 API狀態代碼 和 請求標頭錯誤 (位於平台疑難排解指南中)。
後續步驟
閱讀本檔案後,您現在知道如何產生範例設定檔,以便 測試訊息轉換範本 或 測試您的目的地是否已正確設定.