API終結點: https://platform.adobe.io/data/core/activation/authoring/sample-profiles
此頁列出並說明了可以使用 /authoring/sample-profiles
API終結點。
使用此API終結點為兩個單獨的使用案例生成示例配置檔案。 您可以:
您可以根據AdobeXDM源架構(在測試目標時使用)或目標架構(在製作模板時使用)生成示例配置檔案。 要瞭解AdobeXDM源架構和目標架構之間的差異,請閱讀 消息格式 文章。
請注意,可以使用示例配置檔案的目的不可互換。 基於 目標ID 只能用於根據生成的消息轉換模板和配置檔案 目標實例ID 只能用於test目標終結點。
在繼續之前,請查看 入門指南 瞭解成功調用API所需的重要資訊,包括如何獲得所需的目標創作權限和所需的標題。
將此處生成的示例配置檔案添加到HTTP調用 測試目標。
通過向Web站點發出GET請求,可以根據源架構生成示例配置檔案 authoring/sample-profiles/
終結點,並提供您根據要test的目標配置建立的目標實例的ID。
要獲取目標實例的ID,必須先在Experience PlatformUI中建立到目標的連接,然後才能嘗試test目標。 閱讀 激活目標教程 有關如何獲取要用於此API的目標實例ID的提示,請參閱下面的提示。
API格式
GET authoring/sample-profiles?destinationInstanceId={DESTINATION_INSTANCE_ID}&count={COUNT}
查詢參數 | 說明 |
---|---|
{DESTINATION_INSTANCE_ID} |
生成示例配置檔案時所基於的目標實例的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 |
一個字串欄位,指示是否已將段成員資格作為當前請求的一部分實現。 接受以下值:
|
identityMap |
映射類型欄位,它描述個人的各種標識值及其關聯的命名空間。 有關 identityMap ,閱讀 架構組合的基礎。 |
使用在建立模板時在此處生成的示例配置檔案, 呈現模板步驟。
您可以根據目標方案生成示例配置檔案,向 authoring/sample-profiles/
端點,並根據建立模板的目標配置提供目標ID。
instanceId
與目標配置對應,使用 /destinations
端點。 請參閱 目標配置API參考。API格式
GET authoring/sample-profiles?destinationId={DESTINATION_ID}&count={COUNT}
查詢參數 | 說明 |
---|---|
{DESTINATION_ID} |
生成示例配置檔案時所基於的目標配置的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": "existing"
},
"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": "existing"
},
"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": "existing"
},
"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"
}
]
}
}
]
Destination SDKAPI端點遵循常規Experience PlatformAPI錯誤消息原則。 請參閱 API狀態代碼 和 請求標頭錯誤 中。
閱讀此文檔後,您現在知道如何生成示例配置檔案,以便在 測試消息轉換模板 或 測試目標配置是否正確。