实体端点(配置文件访问)
创建对象:
- 开发人员
Adobe Experience Platform允许您使用RESTful API或用户界面访问Real-Time Customer Profile数据。 本指南概述了如何使用API访问实体(通常称为“用户档案”)。 有关使用Experience Platform UI访问配置文件的详细信息,请参阅配置文件用户指南。
快速入门
本指南中使用的API终结点是Real-Time Customer Profile API的一部分。 在继续之前,请查看快速入门指南,以获取相关文档的链接、此文档中示例API调用的阅读指南,以及有关成功调用任何Experience Platform API所需的所需标头的重要信息。
检索实体
您可以通过向/access/entities
端点发出GET请求以及所需的查询参数来检索配置文件实体。
API格式
GET /access/entities?{QUERY_PARAMETERS}
请求路径中提供的查询参数指定要访问的数据。 您可以包含多个参数,以&分隔。
要访问配置文件实体,您 必须 提供以下查询参数:
schema.name
:实体的XDM架构的名称。 在此使用案例中,schema.name=_xdm.context.profile
。entityId
:您尝试检索的实体的ID。entityIdNS
:您尝试检索的实体的命名空间。 如果entityId
是 而不是 XID,则必须提供此值。
附录的查询参数部分提供了有效参数的完整列表。
请求
以下请求使用标识检索客户的电子邮件和名称。
curl -X GET 'https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.profile&entityId=janedoe@example.com&entityIdNS=email&fields=identities,person.name,workEmail' \
-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}'
响应
成功的响应会返回包含所请求实体的HTTP状态200。
{
"BVrqzwVv7o2p3naHvnsWpqZXv3KJgA": {
"entityId": "BVrqzwVv7o2p3naHvnsWpqZXv3KJgA",
"sources": [
"1000000000"
],
"entity": {
"identities": [
{
"id": "89149270342662559642753730269986316601",
"namespace": {
"code": "ecid"
}
},
{
"id": "janedoe@example.com",
"namespace": {
"code": "email"
}
},
{
"id": "johnsmith@example.com",
"namespace": {
"code": "email"
}
},
{
"id": "89149270342662559642753730269986316604",
"namespace": {
"code": "ecid"
}
},
{
"id": "58832431024964181144308914570411162539",
"namespace": {
"code": "ecid"
}
},
{
"id": "89149270342662559642753730269986316602",
"namespace": {
"code": "ecid"
},
"primary": true
}
],
"person": {
"name": {
"firstName": "Jane",
"middleName": "F",
"lastName": "Doe"
}
},
"workEmail": {
"primary": true,
"address": "janedoe@example.com",
"label": "Jane Doe",
"type": "work",
"status": "active"
}
},
"lastModifiedAt": "2018-08-28T20:57:24Z"
}
}
API格式
GET /access/entities?{QUERY_PARAMETERS}
请求路径中提供的查询参数指定要访问的数据。 您可以包含多个参数,以&分隔。
要访问B2B帐户数据,您 必须 提供以下查询参数:
schema.name
:实体的XDM架构的名称。 在此用例中,值为schema.name=_xdm.context.account
。entityId
:您尝试检索的实体的ID。entityIdNS
:您尝试检索的实体的命名空间。 如果entityId
是 而不是 XID,则必须提供此值。
附录的查询参数部分提供了有效参数的完整列表。
请求
curl -X GET 'https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.account&entityIdNs=b2b_account&entityId=2334262' \
-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}'
响应
成功的响应会返回包含所请求实体的HTTP状态200。
{
"GuQ-AUFjgjaeIw": {
"entityId": "GuQ-AUFjgjaeIw",
"mergePolicy": {
"id": "a6150f47-a94f-4c9d-bfa0-958a370020ee"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "{SOURCE_ID}",
"sourceKey": "{SOURCE_KEY}",
"sourceInstanceID": "{SOURCE_INSTANCE_ID}",
"sourceType": "{SOURCE_TYPE}"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334262",
"identityMap": {
"b2b_account": [
{
"id": "2334263"
},
{
"id": "2334262"
},
{
"id": "{SOURCE_ID}"
}
]
},
"isDeleted": false,
"accountKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
}
}
}
}
API格式
GET /access/entities?{QUERY_PARAMETERS}
请求路径中提供的查询参数指定要访问的数据。 您可以包含多个参数,以&分隔。
要访问B2B Opportunity实体,您 必须 提供以下查询参数:
schema.name
:实体的XDM架构的名称。 在此使用案例中,schema.name=_xdm.context.opportunity
。entityId
:您尝试检索的实体的ID。entityIdNS
:您尝试检索的实体的命名空间。 如果entityId
是 而不是 XID,则必须提供此值。
附录的查询参数部分提供了有效参数的完整列表。
请求
curl -X GET 'https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.opportunity&entityIdNs=b2b_opportunity&entityId=2334262' \
-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}'
响应
成功的响应会返回包含所请求实体的HTTP状态200。
{
"Ggw_AUFjgjaeIw": {
"entityId": "Ggw_AUFjgjaeIw",
"mergePolicy": {
"id": "162824be-07f5-4cd0-aa85-2ff3c8f6c775"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334262",
"identityMap": {
"b2b_opportunity": [
{
"id": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
},
{
"id": "2334263"
},
{
"id": "2334262"
}
]
},
"isDeleted": false,
"opportunityKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
},
"accountKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
}
}
}
}
检索多个实体
您可以通过向/access/entities
端点发出POST请求并在有效负载中提供标识来检索多个配置文件实体。
API格式
POST /access/entities
请求
以下请求按身份列表检索多个客户的名称和电子邮件地址。
curl -X POST https://platform.adobe.io/data/core/ups/access/entities \
-H 'Content-Type: application/json' \
-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}' \
-d '{
"schema":{
"name":"_xdm.context.profile"
},
"fields":[
"identities",
"person.name",
"workEmail"
],
"identities":[
{
"entityId":"89149270342662559642753730269986316601",
"entityIdNS":{
"code":"ECID"
}
},
{
"entityId":"89149270342662559642753730269986316900",
"entityIdNS":{
"code":"ECID"
}
},
{
"entityId":"89149270342662559642753730269986316602",
"entityIdNS":{
"code":"ECID"
}
}
],
"timeFilter": {
"startTime": 1539838505,
"endTime": 1539838510
},
"limit": 10,
"orderby": "-timestamp"
}'
schema.name
fields
identities
identities.entityId
identities.entityIdNS.code
timeFilter.startTime
timeFilter.endTime
limit
orderby
(+/-)timestamp
,默认值为+timestamp
。响应
成功的响应返回HTTP状态200,请求正文中指定了实体的请求字段。
{
"A29cgveD5y64ezlhxjUXNzcm": {
"entityId": "A29cgveD5y64ezlhxjUXNzcm",
"sources": [
"1000000000"
],
"entity": {
"identities": [
{
"id": "89149270342662559642753730269986316601",
"namespace": {
"code": "ecid"
}
},
{
"id": "janedoe@example.com",
"namespace": {
"code": "email"
}
},
{
"id": "05DD23564EC4607F0A490D44",
"namespace": {
"code": "ecid"
}
},
{
"id": "89149270342662559642753730269986316603",
"namespace": {
"code": "ecid"
}
},
{
"id": "janesmith@example.com",
"namespace": {
"code": "email"
}
},
{
"id": "89149270342662559642753730269986316604",
"namespace": {
"code": "ecid"
}
},
{
"id": "89149270342662559642753730269986316700",
"namespace": {
"code": "ecid"
}
},
{
"id": "89149270342662559642753730269986316701",
"namespace": {
"code": "ecid"
}
},
{
"id": "58832431024964181144308914570411162539",
"namespace": {
"code": "ecid"
}
},
{
"id": "89149270342662559642753730269986316602",
"namespace": {
"code": "ecid"
},
"primary": true
}
],
"person": {
"name": {
"firstName": "Jane",
"middleName": "F",
"lastName": "Doe"
}
},
"workEmail": {
"primary": true,
"address": "janedoe@example.com",
"label": "Jane Doe",
"type": "work",
"status": "active"
}
},
"lastModifiedAt": "2018-08-28T20:57:24Z"
},
"A29cgveD5y64e2RixjUXNzcm": {
"entityId": "A29cgveD5y64e2RixjUXNzcm",
"sources": [
""
],
"entity": {},
"lastModifiedAt": "1970-01-01T00:00:00Z"
},
"A29cgveD5y64ezphxjUXNzcm": {
"entityId": "A29cgveD5y64ezphxjUXNzcm",
"sources": [
"1000000000"
],
"entity": {
"identities": [
{
"id": "89149270342662559642753730269986316602",
"namespace": {
"code": "ecid"
},
"primary": true
},
{
"id": "janedoe@example.com",
"namespace": {
"code": "email"
}
}
],
"person": {
"name": {
"firstName": "Jane",
"middleName": "F",
"lastName": "Doe"
}
},
"workEmail": {
"primary": true,
"address": "janedoe@example.com",
"label": "Jane Doe",
"type": "work",
"status": "active"
}
},
"lastModifiedAt": "2018-08-27T23:25:52Z"
}
}
API格式
POST /access/entities
请求
以下请求将检索请求的B2B帐户。
curl -X POST https://platform.adobe.io/data/core/ups/access/entities \
-H 'Content-Type: application/json' \
-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}' \
-d '{
"schema":{
"name":"_xdm.context.account"
},
"identities": [
{
"entityId": "2334262",
"entityIdNS": {
"code":"b2b_account"
}
},
{
"entityId": "2334263",
"entityIdNS": {
"code":"b2b_account"
}
},
{
"entityId": "2334264",
"entityIdNS": {
"code":"b2b_account"
}
}
]
}'
schema.name
identities
identities.entityId
identities.entityIdNS.code
响应
成功的响应会返回包含所请求实体的HTTP状态200。
{
"GuQ-AUFjgjeeIw": {
"requestedIdentity": {
"entityId": "2334263",
"entityIdNS": {
"code": "b2b_account"
}
},
"entityId": "GuQ-AUFjgjeeIw",
"mergePolicy": {
"id": "a6150f47-a94f-4c9d-bfa0-958a370020ee"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334262",
"identityMap": {
"b2b_account": [
{
"id": "2334263"
},
{
"id": "2334262"
},
{
"id": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
}
]
},
"isDeleted": false,
"accountKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
}
}
},
"GuQ-AUFjgjaeIw": {
"requestedIdentity": {
"entityId": "2334262",
"entityIdNS": {
"code": "b2b_account"
}
},
"entityId": "GuQ-AUFjgjaeIw",
"mergePolicy": {
"id": "a6150f47-a94f-4c9d-bfa0-958a370020ee"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334262",
"identityMap": {
"b2b_account": [
{
"id": "2334263"
},
{
"id": "2334262"
},
{
"id": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
}
]
},
"isDeleted": false,
"accountKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
}
}
},
"GuQ-AUFjgjmeIw": {
"requestedIdentity": {
"entityId": "2334265",
"entityIdNS": {
"code": "b2b_account"
}
},
"entityId": "GuQ-AUFjgjmeIw",
"mergePolicy": {
"id": "a6150f47-a94f-4c9d-bfa0-958a370020ee"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0054c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334265",
"identityMap": {
"b2b_account": [
{
"id": "0054c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
},
{
"id": "2334265"
}
]
},
"isDeleted": false,
"accountKey": {
"sourceID": "2334265",
"sourceKey": "2334265",
"sourceInstanceID": "2334265",
"sourceType": "Random"
}
}
}
API格式
POST /access/entities
请求
以下请求将检索请求的B2B机会。
curl -X POST https://platform.adobe.io/data/core/ups/access/entities \
-H 'Content-Type: application/json' \
-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}' \
-d '{
"schema":{
"name":"_xdm.context.opportunity"
},
"identities": [
{
"entityId": "2334262",
"entityIdNS": {
"code":"b2b_opportunity"
}
},
{
"entityId": "2334263",
"entityIdNS": {
"code":"b2b_opportunity"
}
},
{
"entityId": "2334264",
"entityIdNS": {
"code":"b2b_opportunity"
}
},
{
"entityId": "2334265",
"entityIdNS": {
"code":"b2b_opportunity"
}
}
]
}'
schema.name
identities
identities.entityId
identities.entityIdNS.code
响应
成功的响应会返回包含所请求实体的HTTP状态200。
{
"Ggw_AUFjgjaeIw": {
"requestedIdentity": {
"entityId": "2334262",
"entityIdNS": {
"code": "b2b_opportunity"
}
},
"entityId": "Ggw_AUFjgjaeIw",
"mergePolicy": {
"id": "162824be-07f5-4cd0-aa85-2ff3c8f6c775"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334262",
"identityMap": {
"b2b_opportunity": [
{
"id": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
},
{
"id": "2334263"
},
{
"id": "2334262"
}
]
},
"isDeleted": false,
"opportunityKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
},
"accountKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
}
}
},
"Ggw_AUFjgjieIw": {
"requestedIdentity": {
"entityId": "2334264",
"entityIdNS": {
"code": "b2b_opportunity"
}
},
"entityId": "Ggw_AUFjgjieIw",
"mergePolicy": {
"id": "162824be-07f5-4cd0-aa85-2ff3c8f6c775"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0041c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334264",
"identityMap": {
"b2b_opportunity": [
{
"id": "2334264"
},
{
"id": "0041c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
}
]
},
"isDeleted": false,
"opportunityKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
},
"accountKey": {
"sourceID": "2334264",
"sourceKey": "2334264",
"sourceInstanceID": "2334264",
"sourceType": "Salesforce"
}
}
},
"Ggw_AUFjgjeeIw": {
"requestedIdentity": {
"entityId": "2334263",
"entityIdNS": {
"code": "b2b_opportunity"
}
},
"entityId": "Ggw_AUFjgjeeIw",
"mergePolicy": {
"id": "162824be-07f5-4cd0-aa85-2ff3c8f6c775"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334262",
"identityMap": {
"b2b_opportunity": [
{
"id": "0043c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
},
{
"id": "2334263"
},
{
"id": "2334262"
}
]
},
"isDeleted": false,
"opportunityKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
},
"accountKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
}
}
},
"Ggw_AUFjgjmeIw": {
"requestedIdentity": {
"entityId": "2334265",
"entityIdNS": {
"code": "b2b_opportunity"
}
},
"entityId": "Ggw_AUFjgjmeIw",
"mergePolicy": {
"id": "162824be-07f5-4cd0-aa85-2ff3c8f6c775"
},
"sources": [
"er_m_attr"
],
"entity": {
"_id": "id1",
"extSourceSystemAudit": {
"lastReferencedDate": "2024-03-09 12:21:43.0",
"lastActivityDate": "2024-03-09 12:21:43.0",
"lastUpdatedDate": "2024-03-09 12:21:43.0",
"lastUpdatedBy": "{USER_ID}",
"externalKey": {
"sourceID": "00394S0001xpG6xABE",
"sourceKey": "0054c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce",
"sourceInstanceID": "00DC0000000Q35nMAC",
"sourceType": "Salesforce"
},
"lastViewedDate": "2024-03-09 12:21:43.0",
"createdDate": "2024-03-09 12:21:43.0"
},
"accountID": "2334265",
"identityMap": {
"b2b_opportunity": [
{
"id": "2334265"
},
{
"id": "0054c329201xpG6xAAE@00DC0000000Q35nWIN.Salesforce"
}
]
},
"isDeleted": false,
"opportunityKey": {
"sourceID": "2334262",
"sourceKey": "2334262",
"sourceInstanceID": "2334262",
"sourceType": "Random"
},
"accountKey": {
"sourceID": "2334265",
"sourceKey": "2334265",
"sourceInstanceID": "2334265",
"sourceType": "Random"
}
}
}
}
访问结果的后续页面
检索时序事件时,结果将分页。 如果有后续结果页,则_page.next
属性将包含ID。 此外,_links.next.href
属性还提供用于检索下一页的请求URI。 要检索结果,请对/access/entities
端点发出另一个GET请求,并使用提供的URI的值替换/entities
。
/entities/
。 它只应出现一次,如/access/entities?start=...
API格式
GET /access/{NEXT_URI}
{NEXT_URI}
_links.next.href
。请求
以下请求通过使用_links.next.href
URI作为请求路径来检索结果的下一页。
curl -X GET \
'https://platform.adobe.io/data/core/ups/access/entities?start=c8d11988-6b56-4571-a123-b6ce74236037&orderby=timestamp&schema.name=_xdm.context.experienceevent&relatedSchema.name=_xdm.context.profile&relatedEntityId=89149270342662559642753730269986316900&relatedEntityIdNS=ECID&fields=endUserIDs,web,channel&startTime=1531260476000&endTime=1531260480000&limit=1' \
-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}'
响应
成功的响应将返回结果的下一页。 此响应没有后续结果页,如_page.next
和_links.next.href
的空字符串值所指示。
{
"_page": {
"orderby": "timestamp",
"start": "c8d11988-6b56-4571-a123-b6ce74236037",
"count": 1,
"next": ""
},
"children": [
{
"relatedEntityId": "A29cgveD5y64e2RixjUXNzcm",
"entityId": "c8d11988-6b56-4571-a123-b6ce74236037",
"timestamp": 1531260477000,
"entity": {
"endUserIDs": {
"_experience": {
"ecid": {
"id": "89149270342662559642753730269986316900",
"namespace": {
"code": "ecid"
}
}
}
},
"channel": {
"_type": "web"
},
"web": {
"webPageDetails": {
"name": "Fernie Snow",
"pageViews": {
"value": 1
}
}
}
},
"lastModifiedAt": "2018-08-21T06:50:01Z"
}
],
"_links": {
"next": {
"href": ""
}
}
}
删除实体
通过向/access/entities
端点发出DELETE请求以及必需的查询参数,可以从配置文件存储中删除实体。
API格式
DELETE /access/entities?{QUERY_PARAMETERS}
请求路径中提供的查询参数指定要访问的数据。 您可以包含多个参数,以&分隔。
要删除实体,您 必须 提供以下查询参数:
schema.name
:实体的XDM架构的名称。 在此使用案例中,您 只能 使用schema.name=_xdm.context.profile
。entityId
:您尝试检索的实体的ID。entityIdNS
:您尝试检索的实体的命名空间。 如果entityId
是 而不是 XID,则必须提供此值。mergePolicyId
:实体的合并策略ID。 合并策略包含有关身份拼接和键值XDM对象合并的信息。 如果未提供此值,则将使用默认合并策略。
请求
以下请求删除指定的实体。
curl -X DELETE 'https://platform.adobe.io/data/core/ups/access/entities?schema.name=_xdm.context.profile&entityId=janedoe@example.com&entityIdNS=email' \
-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}'
响应
成功的响应返回带有空响应正文的HTTP状态202。
后续步骤
按照本指南,您已成功访问Real-Time Customer Profile数据字段、配置文件和时序数据。 要了解如何访问存储在Experience Platform中的其他数据资源,请参阅数据访问概述。
附录
以下部分提供有关使用API访问Profile数据的补充信息。
查询参数
在/access/entities
终结点的GET请求的路径中使用了以下参数。 它们用于标识要访问的配置文件实体,并筛选响应中返回的数据。 必填参数标有标签,其余参数为可选参数。
schema.name
schema.name=_xdm.context.profile
relatedSchema.name
schema.name
是_xdm.context.experienceevent
,则此值 必须 为时间序列事件相关的配置文件实体指定架构。relatedSchema.name=_xdm.context.profile
entityId
entityIdNS
)。entityId=janedoe@example.com
entityIdNS
entityId
作为XID提供,则字段 必须 指定标识命名空间。entityIdNS=email
relatedEntityId
schema.name
是_xdm.context.experienceevent
,则此值 必须 指定相关配置文件实体的ID。 此值遵循与entityId
相同的规则。relatedEntityId=69935279872410346619186588147492736556
relatedEntityIdNS
schema.name
是“_xdm.context.experienceevent”,此值必须为relatedEntityId
中指定的实体指定身份命名空间。relatedEntityIdNS=CRMID
fields
fields=personalEmail,person.name,person.gender
mergePolicyId
mergePolicyId=5aa6885fcf70a301dabdfa4a
orderBy
(+/-)timestamp
,默认值为+timestamp
。orderby=-timestamp
startTime
startTime=1539838505
endTime
endTime=1539838510
limit
limit=100
property
property=webPageDetails.isHomepage=true&property=localTime<="2020-07-20"