根据源架构生成样本配置文件 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 作为查询参数。
- 生成要在调用时使用的配置文件 测试目标配置是否正确 — 通过使用 目标实例Id 作为查询参数。
您可以根据AdobeXDM源架构(在测试目标时使用)或目标支持的目标架构(在构建模板时使用)生成示例配置文件。 要了解AdobeXDM源架构与目标架构之间的区别,请阅读 消息格式 文章。
请注意,示例配置文件的使用目的不可互换。 配置文件生成基于 目标ID 只能用于制作您的消息转换模板和基于 目标实例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 SDKAPI端点遵循常规Experience PlatformAPI错误消息原则。 请参阅 API状态代码 和 请求标头错误 ,位于平台疑难解答指南中。
后续步骤
阅读本文档后,您现在知道如何生成要在以下情况下使用的示例配置文件 测试消息转换模板 或 测试目标配置是否正确.