實體端點(設定檔存取)
- 主題:
- 輪廓
建立對象:
- 開發人員
Adobe Experience Platform可讓您使用RESTful API或使用者介面存取Real-Time Customer Profile資料。 本指南會概述如何使用API存取實體(通常稱為「設定檔」)。 如需使用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
:您嘗試擷取的實體識別碼。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
:您嘗試擷取的實體識別碼。entityIdNS
:您嘗試擷取的實體的名稱空間。 如果entityId
是 而非 XID,則必須提供此值。
附錄的查詢引數區段中提供了有效引數的完整清單。
要求
擷取B2B帳戶的範例要求
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機會實體,您 必須 提供下列查詢引數:
schema.name
:實體的XDM結構描述的名稱。 在此使用案例中,schema.name=_xdm.context.opportunity
。entityId
:您嘗試擷取的實體識別碼。entityIdNS
:您嘗試擷取的實體的名稱空間。 如果entityId
是 而非 XID,則必須提供此值。
附錄的查詢引數區段中提供了有效引數的完整清單。
要求
擷取B2B機會實體的範例要求
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 | 字串 | (必要) 實體所屬的XDM結構描述名稱。 |
fields | 陣列 | 要以字串陣列形式傳回的XDM欄位。 預設會傳回所有欄位。 |
identities | 陣列 | (必要) 陣列,包含您要存取之實體的身分清單。 |
identities.entityId | 字串 | 您要存取之實體的ID。 |
identities.entityIdNS.code | 字串 | 您要存取之實體ID的名稱空間。 |
timeFilter.startTime | 整數 | 指定篩選設定檔實體的開始時間(毫秒)。 預設情況下,此值會設定為可用時間的開始。 |
timeFilter.endTime | 整數 | 指定篩選設定檔實體的結束時間(毫秒)。 預設情況下,此值會設定為可用時間的結尾。 |
limit | 整數 | 要傳回的最大記錄數。 預設情況下,此值會設為1000。 |
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
:您嘗試擷取的實體識別碼。entityIdNS
:您嘗試擷取的實體的名稱空間。 如果entityId
是 而非 XID,則必須提供此值。mergePolicyId
:實體的合併原則識別碼。 合併原則包含身分拼接和索引鍵/值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資料欄位、設定檔和時間序列資料。 若要瞭解如何存取儲存在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
,此值 必須 指定相關設定檔實體的識別碼。 此值遵循與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"