使用Destination SDK設定串流目的地
概觀 overview
此頁面說明如何在中使用該資訊 目的地SDK中的設定選項 以及在其他Destination SDK功能和API參考檔案中設定 串流目的地. 這些步驟會依序排列如下。
先決條件 prerequisites
繼續進行下列步驟之前,請閱讀 Destination SDK快速入門 頁面以取得必要的Adobe I/O驗證認證,以及使用Destination SDKAPI的其他必要條件。 這假設您已完成合作關係與許可權必要條件,並準備好開始開發您的目的地。
在Destination SDK中使用設定選項來設定目的地的步驟 steps
步驟1:建立伺服器和範本設定 create-server-template-configuration
開始者 建立伺服器和範本組態 使用 /destinations-server
端點。
以下是設定範例。 請注意,中的訊息轉換範本 requestBody.value
在步驟3中處理引數, 建立轉換範本.
POST platform.adobe.io/data/core/activation/authoring/destination-servers
{
"name":"Moviestar destination server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://api.moviestar.com/data/{{customerData.region}}/items"
}
},
"httpTemplate":{
"httpMethod":"POST",
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"insert after you create a template in step 3"
},
"contentType":"application/json"
}
}
步驟2:建立目的地設定 create-destination-configuration
以下顯示的是目的地範本的設定範例,範本是使用 /destinations
api端點。 另請參閱 建立目的地設定 以取得詳細資訊。
若要在步驟1中將伺服器和範本組態連線至此目的地組態,請將伺服器和範本組態的執行個體ID新增為 destinationServerId
此處。
identityNamespaces
,如下所示。 如果未設定目標身分,使用者將無法繼續通過 對應步驟 啟動工作流程的。POST platform.adobe.io/data/core/activation/authoring/destinations
{
"name":"Moviestar",
"description":"Moviestar is a fictional destination, used for this example.",
"status":"TEST",
"customerAuthenticationConfigurations":[
{
"authType":"BEARER"
}
],
"customerDataFields":[
{
"name":"endpointsInstance",
"type":"string",
"title":"Select Endpoint",
"description":"Moviestar manages several instances across the globe for REST endpoints that our customers are provisioned for. Select your endpoint in the dropdown list.",
"isRequired":true,
"enum":[
"US",
"EU",
"APAC",
"NZ"
]
},
{
"name":"customerID",
"type":"string",
"title":"Moviestar Customer ID",
"description":"Your customer ID in the Moviestar destination (e.g. abcdef).",
"isRequired":true,
"pattern":""
}
],
"uiAttributes":{
"documentationLink":"http://www.adobe.com/go/destinations-moviestar-en",
"category":"mobile",
"connectionType":"Server-to-server",
"frequency":"Streaming"
},
"identityNamespaces":{
"external_id":{
"acceptsAttributes":true,
"acceptsCustomNamespaces":true
},
"another_id":{
"acceptsAttributes":true,
"acceptsCustomNamespaces":true
}
},
"audienceMetadataConfig":{
"mapExperiencePlatformSegmentName":false,
"mapExperiencePlatformSegmentId":false,
"mapUserInput":false,
"audienceTemplateId":"cbf90a70-96b4-437b-86be-522fbdaabe9c"
},
"aggregation":{
"aggregationType":"CONFIGURABLE_AGGREGATION",
"configurableAggregation":{
"aggregationPolicyId":null,
"aggregationKey":{
"includeSegmentId":true,
"includeSegmentStatus":true,
"includeIdentity":true,
"oneIdentityPerGroup":true,
"groups":null
},
"splitUserById":true,
"maxBatchAgeInSecs":2400,
"maxNumEventsInBatch":5000
}
},
"destinationDelivery":[
{
"authenticationRule":"CUSTOMER_AUTHENTICATION",
"destinationServerId":"9c77000a-4559-40ae-9119-a04324a3ecd4"
}
]
}
步驟3:建立訊息轉換範本 — 使用範本化語言指定訊息輸出格式 create-transformation-template
您必須根據目的地支援的負載,建立範本,將匯出的資料格式從AdobeXDM格式轉換為目的地支援的格式。 請參閱區段中的範本範例 使用範本語言進行身分、屬性和對象成員資格轉換 並使用 範本製作工具 由Adobe提供。
在您建立適合您的訊息轉換範本後,請將其新增到您在步驟1中建立的伺服器和範本設定中。
{
"name":"Moviestar destination server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://api.moviestar.com/data/{{customerData.region}}/items"
}
},
"httpTemplate":{
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{\n \"users\": [\n {% for profile in input.profiles %}\n {{profile|raw}}{% if not loop.last %},{% endif %}\n {% endfor %}\n ]\n}"
},
"contentType":"application/json"
}
}
步驟4:建立對象中繼資料設定 create-audience-metadata-configuration
對於某些目的地,Destination SDK需要您設定對象中繼資料設定,以程式設計方式在您的目的地建立、更新或刪除對象。 請參閱 對象中繼資料管理 瞭解何時需要設定此設定及如何設定的相關資訊。
如果您使用對象中繼資料設定,則必須將其連線至您在步驟2中建立的目的地設定。 將對象中繼資料設定的例項ID新增至您的目的地設定,如下所示 audienceTemplateId
.
{
"name":"Moviestar",
"description":"Moviestar is a fictional destination, used for this example.",
"status":"TEST",
"customerAuthenticationConfigurations":[
{
"authType":"BEARER"
}
],
"customerDataFields":[
{
"name":"endpointsInstance",
"type":"string",
"title":"Select Endpoint",
"description":"Moviestar manages several instances across the globe for REST endpoints that our customers are provisioned for. Select your endpoint in the dropdown list.",
"isRequired":true,
"enum":[
"US",
"EU",
"APAC",
"NZ"
]
},
{
"name":"customerID",
"type":"string",
"title":"Moviestar Customer ID",
"description":"Your customer ID in the Moviestar destination (e.g. abcdef).",
"isRequired":true,
"pattern":""
}
],
"uiAttributes":{
"documentationLink":"http://www.adobe.com/go/destinations-moviestar-en",
"category":"mobile",
"connectionType":"Server-to-server",
"frequency":"Streaming"
},
"identityNamespaces":{
"external_id":{
"acceptsAttributes":true,
"acceptsCustomNamespaces":true
},
"another_id":{
"acceptsAttributes":true,
"acceptsCustomNamespaces":true
}
},
"audienceMetadataConfig":{
"mapExperiencePlatformSegmentName":false,
"mapExperiencePlatformSegmentId":false,
"mapUserInput":false,
"audienceTemplateId":"cbf90a70-96b4-437b-86be-522fbdaabe9c"
},
"aggregation":{
"aggregationType":"CONFIGURABLE_AGGREGATION",
"configurableAggregation":{
"aggregationPolicyId":null,
"aggregationKey":{
"includeSegmentId":true,
"includeSegmentStatus":true,
"includeIdentity":true,
"oneIdentityPerGroup":true,
"groups":null
},
"splitUserById":true,
"maxBatchAgeInSecs":2400,
"maxNumEventsInBatch":5000
}
},
"destinationDelivery":[
{
"authenticationRule":"CUSTOMER_AUTHENTICATION",
"destinationServerId":"9c77000a-4559-40ae-9119-a04324a3ecd4"
}
]
}
步驟5:設定驗證 set-up-authentication
視您是否指定 "authenticationRule": "CUSTOMER_AUTHENTICATION"
或 "authenticationRule": "PLATFORM_AUTHENTICATION"
在上述目的地設定中,您可以使用 /destination
或 /credentials
端點。
CUSTOMER_AUTHENTICATION
是兩種驗證規則中較常見的一種,如果您要求使用者先對您的目的地提供某種形式的驗證,然後才能設定連線和匯出資料,則需使用這兩種驗證規則。如果您已選取 "authenticationRule": "CUSTOMER_AUTHENTICATION"
在目的地設定中,且您的目的地支援OAuth 2驗證方法,請閱讀 OAuth 2驗證.
如果您已選取 "authenticationRule": "PLATFORM_AUTHENTICATION"
,您必須建立 認證設定.
步驟6:測試您的目的地 test-destination
使用先前步驟中的設定端點設定您的目的地後,您可以使用 目的地測試工具 測試Adobe Experience Platform與目的地之間的整合。
在測試目的地的程式中,您必須使用Experience PlatformUI來建立區段,並啟用至您的目的地。 請參閱以下兩個資源,以取得如何在Experience Platform中建立對象的指示:
步驟7:發佈您的目的地 publish-destination
設定並測試目的地後,請使用 目的地發佈API 將您的設定提交給Adobe進行檢閱。
步驟8:記錄您的目的地 document-destination
如果您是獨立軟體廠商(ISV)或系統整合商(SI),請建立 產品化整合,使用 自助服務檔案程式 若要在中建立您目的地的產品檔案頁面 Experience Platform目的地目錄.
步驟9:提交目的地以供Adobe複查 submit-for-review
最後,在Experience Platform目錄中發佈目的地並對所有Experience Platform客戶可見之前,您必須正式提交目的地以供Adobe檢閱。 尋找關於如何操作的完整資訊 送出供檢閱以Destination SDK撰寫的生產目的地.