根据源架构生成样本配置文件 sample-profile-api-operations

IMPORTANT
API端点https://platform.adobe.io/data/core/activation/authoring/sample-profiles

本页列出并描述了可以使用执行的所有API操作。 /authoring/sample-profiles API端点。

为不同的API生成不同的配置文件类型 different-profiles-different-apis

IMPORTANT
使用此API端点为两个不同的用例生成样本配置文件。 您可以:

您可以根据AdobeXDM源架构(在测试目标时使用)或目标支持的目标架构(在构建模板时使用)生成示例配置文件。 要了解AdobeXDM源架构与目标架构之间的区别,请阅读 消息格式 文章。

请注意,示例配置文件的使用目的不可互换。 配置文件生成基于 目标ID 只能用于制作您的消息转换模板和基于 目标实例Id 只能用于测试目标端点。

范例配置文件生成API操作快速入门 get-started

在继续之前,请查看 快速入门指南 获取成功调用API所需了解的重要信息,包括如何获取所需的目标创作权限和所需的标头。

根据测试目标时使用的源架构生成样本配置文件 generate-sample-profiles-source-schema

IMPORTANT
在以下情况下,将此处生成的示例配置文件添加到HTTP调用: 测试您的目标.

您可以通过对以下网站发出GET请求,根据源架构生成样本配置文件: authoring/sample-profiles/ 端点,并提供您根据要测试的目标配置创建的目标实例的ID。

要获取目标实例的ID,您必须先在Experience PlatformUI中创建与目标的连接,然后再尝试测试目标。 阅读 激活目标教程 有关如何获取要用于此API的目标实例ID的信息,请参阅下面的提示。

IMPORTANT

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架构对应的受众成员资格、身份和配置文件属性。

TIP
响应仅返回目标实例中使用的受众成员资格、身份和配置文件属性。 即使源架构具有其他字段,这些字段也会被忽略。
[
    {
        "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

IMPORTANT
在中使用构建模板时在此处生成的示例用户档案 渲染模板步骤.

GET您可以根据向 authoring/sample-profiles/ 端点,并提供要基于其创建模板的目标配置的目标ID。

TIP
  • 您应在此处使用的目标ID是 instanceId 对应于使用创建的目标配置 /destinations 端点。 请参阅 检索目标配置 以了解更多详细信息。

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": "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状态代码请求标头错误 ,位于平台疑难解答指南中。

后续步骤

阅读本文档后,您现在知道如何生成要在以下情况下使用的示例配置文件 测试消息转换模板测试目标配置是否正确.

recommendation-more-help
7f4d1967-bf93-4dba-9789-bb6b505339d6