API端點: https://platform.adobe.io/data/core/activation/authoring/testing/destinationInstance/
此頁面列出並說明您可使用 /authoring/testing/destinationInstance/
API端點,以測試您的目的地是否已正確設定,以及驗證資料流程對您所設定目的地的完整性。 有關此端點支援的功能的說明,請閱讀 測試您的目標配置.
您可以使用或不將設定檔新增至呼叫,向測試端點提出請求。 如果您未在請求上傳送任何設定檔,Adobe會在內部為您產生這些設定檔,並將其新增至請求。
您可以使用 設定檔產生API範例 若要建立要在向目的地測試API發出的請求中使用的設定檔。
繼續之前,請檢閱 快速入門手冊 若要成功呼叫API,需知的重要資訊,包括如何取得必要的目的地編寫權限和必要的標題。
您可以向發出POST要求,以測試您的目的地設定 authoring/testing/destinationInstance/{DESTINATION_INSTANCE_ID}
端點,並提供您要測試之目的地的目的地執行個體ID。
API格式
POST authoring/testing/destinationInstance/{DESTINATION_INSTANCE_ID}
查詢參數 | 說明 |
---|---|
{DESTINATION_INSTANCE_ID} |
您要測試之目的地的目的地執行個體ID。 |
要求
下列請求會呼叫您目的地的REST API端點。 請求由 {DESTINATION_INSTANCE_ID}
查詢參數。
curl --location --request POST 'https://platform.adobe.io/data/core/activation/authoring/testing/destinationInstance/49966037-32cd-4457-a105-2cbf9c01826a' \
--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,並從目的地的REST API端點傳回API回應。
{
"results":[
{
"aggregationKey":{
"destinationInstanceId":"string",
"segmentId":"string",
"segmentStatus":"realized",
"identityNamespaces":[
[
"email",
"phone"
]
]
},
"httpCalls":[
{
"traceId":"a06fec2d-a886-4219-8975-4e4b7ed26539",
"request":{
"body":"{ \"attributes\": [ { \"external_id\": \"external_id-h29Fq\" , \"AdobeExperiencePlatformSegments\": { \"add\": [ \"Nirvana fans\" , \"RHCP fans\" ], \"remove\": [ ] } , \"key\": \"string\" } ] }",
"headers":[
{
"Content-Type":"application/json"
}
],
"method":"POST",
"uri":"https://api.moviestar.com/users/track"
},
"response":{
"body":"{\"status\": \"success\"}",
"code":"200",
"headers":[
{
"Connection":"keep-alive"
},
{
"Content-Type":"application/json"
},
{
"Server":"nginx"
},
{
"Vary":"Origin,Accept-Encoding"
},
{
"transfer-encoding":"chunked"
}
]
}
}
]
}
],
"inputProfiles":[
{
"segmentMembership":{
"ups":{
"03fb9938-8537-4b4c-87f9-9c4d413a0ee5":{
"lastQualificationTime":"2021-06-17T12:25:12.872039Z",
"status":"realized"
},
"27e05542-d6a3-46c7-9c8e-d59d50229530":{
"lastQualificationTime":"2021-06-17T12:25:12.872042Z",
"status":"realized"
}
}
},
"personalEmail":{
"address":"john.smith@abc.com"
},
"identityMap":{
"ECID":[
{
"id":"ECID-vlnt6"
}
]
},
"person":{
"name":{
"firstName":"string"
}
}
}
]
}
屬性 | 說明 |
---|---|
aggregationKey |
包括有關為目標配置的聚合策略的資訊。 如需詳細資訊,請閱讀 聚合策略 區段。 |
traceId |
操作的唯一標識符。 遇到錯誤時,您可以與Adobe團隊共用此ID以進行疑難排解。 |
results.httpCalls.request |
包含Adobe傳送至您目的地的要求。 |
results.httpCalls.response |
包括Adobe從您目的地收到的回應。 |
inputProfiles |
包括在呼叫至目的地時匯出的設定檔。 配置檔案與源架構匹配。 |
您可以向發出POST要求,以測試您的目的地設定 authoring/testing/destinationInstance/{DESTINATION_INSTANCE_ID}
端點,並提供您要測試之目的地的目的地執行個體ID。
API格式
POST authoring/testing/destinationInstance/{DESTINATION_INSTANCE_ID}
查詢參數 | 說明 |
---|---|
{DESTINATION_INSTANCE_ID} |
您要測試之目的地的目的地執行個體ID。 |
要求
下列請求會呼叫您目的地的REST API端點。 請求是由有效負載中提供的參數和 {DESTINATION_INSTANCE_ID}
查詢參數。
curl --location --request POST 'https://platform.adobe.io/data/core/activation/authoring/testing/destinationInstance/49966037-32cd-4457-a105-2cbf9c01826a' \
--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}' \
--data-raw '{
"profiles":[
{
"segmentMembership":{
"ups":{
"374a9a6c-c719-4cdb-a660-155a2838e6d6":{
"lastQualificationTime":"2021-05-13T12:16:27.248585Z",
"status":"realized"
},
"896f8776-9498-47b4-b994-51cb3f61c2c5":{
"lastQualificationTime":"2021-05-13T12:16:27.248605Z",
"status":"realized"
}
}
},
"identityMap":{
"ECID":[
{
"id":"ECID-Z3i2t"
}
],
"external_id":[
{
"id":"external_id-h29Fq"
}
]
},
"attributes":{
"firstName":{
"value":"John"
}
}
}
]
}'
回應
成功的回應會傳回HTTP狀態200,並從目的地的REST API端點傳回API回應。
{
"results":[
{
"aggregationKey":{
"destinationInstanceId":"string",
"segmentId":"string",
"segmentStatus":"realized",
"identityNamespaces":[
[
"email",
"phone"
]
]
},
"httpCalls":[
{
"traceId":"a06fec2d-a886-4219-8975-4e4b7ed26539",
"request":{
"body":"{ \"attributes\": [ { \"external_id\": \"external_id-h29Fq\" , \"AdobeExperiencePlatformSegments\": { \"add\": [ \"Nirvana fans\" , \"RHCP fans\" ], \"remove\": [ ] } , \"key\": \"string\" } ] }",
"headers":[
{
"Content-Type":"application/json"
}
],
"method":"POST",
"uri":"https://api.moviestar.com/users/track"
},
"response":{
"body":"{\"status\": \"success\"}",
"code":"200",
"headers":[
{
"Connection":"keep-alive"
},
{
"Content-Type":"application/json"
},
{
"Server":"nginx"
},
{
"Vary":"Origin,Accept-Encoding"
},
{
"transfer-encoding":"chunked"
}
]
}
}
]
}
],
"inputProfiles":[
{
"segmentMembership":{
"ups":{
"374a9a6c-c719-4cdb-a660-155a2838e6d6":{
"lastQualificationTime":"2021-05-13T12:16:27.248585Z",
"status":"realized"
},
"896f8776-9498-47b4-b994-51cb3f61c2c5":{
"lastQualificationTime":"2021-05-13T12:16:27.248605Z",
"status":"realized"
}
}
},
"identityMap":{
"ECID":[
{
"id":"ECID-Z3i2t"
}
],
"external_id":[
{
"id":"external_id-h29Fq"
}
]
},
"attributes":{
"firstName":{
"value":"John"
}
}
}
]
}
Destination SDKAPI端點遵循一般Experience PlatformAPI錯誤訊息原則。 請參閱 API狀態代碼 和 請求標題錯誤 (位於平台疑難排解指南中)。
閱讀本檔案後,您現在知道如何測試您的目的地。 您現在可以使用Adobe 自助服務檔案程式 來建立目的地的檔案頁面。