建立目的地設定

此頁面以範例說明API請求和裝載,您可透過使用 /authoring/destinations api端點。

如需可透過此端點設定的功能的詳細說明,請參閱以下文章:

IMPORTANT
Destination SDK支援的所有引數名稱和值如下 區分大小寫. 為避免區分大小寫錯誤,請完全依照檔案中所示使用引數名稱和值。

目的地設定API操作快速入門 get-started

在繼續之前,請檢閱 快速入門手冊 如需您成功呼叫API所需的重要資訊,包括如何取得必要的目的地撰寫許可權和必要的標頭。

建立目的地設定 create

您可以透過向以下發出POST請求來建立新的目的地設定: /authoring/destinations 端點。

TIP
API端點platform.adobe.io/data/core/activation/authoring/destinations

API格式

POST /authoring/destinations

以下請求會建立新的 Amazon S3 目的地設定,由承載中提供的引數設定。 以下承載包含接受的檔案型目的地的所有引數 /authoring/destinations 端點。

請注意,您不需要將所有引數新增至API呼叫,而且裝載可以根據您的API需求自訂。

要求
code language-shell
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destinations \
 -H 'Authorization: Bearer {ACCESS_TOKEN}' \
 -H 'Content-Type: application/json' \
 -H 'x-gw-ims-org-id: {ORG_ID}' \
 -H 'x-api-key: {API_KEY}' \
 -H 'x-sandbox-name: {SANDBOX_NAME}' \
 -d '
{
   "name":"Amazon S3 destination with predefined CSV formatting options",
   "description":"Amazon S3 destination with predefined CSV formatting options",
   "status":"TEST",
   "customerAuthenticationConfigurations":[
      {
         "authType":"S3"
      }
   ],
   "customerDataFields":[
      {
         "name":"bucket",
         "title":"Enter the name of your Amazon S3 bucket",
         "description":"Amazon S3 bucket name",
         "type":"string",
         "isRequired":true,
         "readOnly":false,
         "hidden":false
      },
      {
         "name":"path",
         "title":"Enter the path to your S3 bucket folder",
         "description":"Enter the path to your S3 bucket folder",
         "type":"string",
         "isRequired":true,
         "pattern":"^[A-Za-z]+$",
         "readOnly":false,
         "hidden":false
      },
      {
         "name":"compression",
         "title":"Compression format",
         "description":"Select the desired file compression format.",
         "type":"string",
         "isRequired":true,
         "readOnly":false,
         "enum":[
            "SNAPPY",
            "GZIP",
            "DEFLATE",
            "NONE"
         ]
      },
      {
         "name":"fileType",
         "title":"Select a fileType",
         "description":"Select fileType",
         "type":"string",
         "isRequired":true,
         "readOnly":false,
         "hidden":false,
         "enum":[
            "csv",
            "json",
            "parquet"
         ],
         "default":"csv"
      }
   ],
   "uiAttributes":{
      "documentationLink":"https://www.adobe.com/go/destinations-amazon-s3-en",
      "category":"cloudStorage",
      "icon":{
         "key":"amazonS3"
      },
      "connectionType":"S3",
      "frequency":"Batch"
   },
   "destinationDelivery":[
      {
         "deliveryMatchers":[
            {
               "type":"SOURCE",
               "value":[
                  "batch"
               ]
            }
         ],
         "authenticationRule":"CUSTOMER_AUTHENTICATION",
         "destinationServerId":"{{destinationServerId}}"
      }
   ],
   "schemaConfig":{
      "profileRequired":true,
      "segmentRequired":true,
      "identityRequired":true
   },
   "batchConfig":{
      "allowMandatoryFieldSelection":true,
      "allowDedupeKeyFieldSelection":true,
      "defaultExportMode":"DAILY_FULL_EXPORT",
      "allowedExportMode":[
         "DAILY_FULL_EXPORT",
         "FIRST_FULL_THEN_INCREMENTAL"
      ],
      "allowedScheduleFrequency":[
         "DAILY",
         "EVERY_3_HOURS",
         "EVERY_6_HOURS",
         "EVERY_8_HOURS",
         "EVERY_12_HOURS",
         "ONCE"
      ],
      "defaultFrequency":"DAILY",
      "defaultStartTime":"00:00",
      "filenameConfig":{
         "allowedFilenameAppendOptions":[
            "SEGMENT_NAME",
            "DESTINATION_INSTANCE_ID",
            "DESTINATION_INSTANCE_NAME",
            "ORGANIZATION_NAME",
            "SANDBOX_NAME",
            "DATETIME",
            "CUSTOM_TEXT"
         ],
         "defaultFilenameAppendOptions":[
            "DATETIME"
         ],
         "defaultFilename":"%DESTINATION%_%SEGMENT_ID%"
      },
      "backfillHistoricalProfileData":true
   }
}'
table 0-row-3 1-row-3 2-row-3 3-row-3 4-row-3 5-row-3 6-row-3 7-row-3 8-row-3 9-row-3 10-row-3 11-row-3 12-row-3 13-row-3 14-row-3 15-row-3 16-row-3 17-row-3 18-row-3 19-row-3 20-row-3 21-row-3 22-row-3 23-row-3 24-row-3 25-row-3 26-row-3 27-row-3 28-row-3 29-row-3 30-row-3 31-row-3 layout-auto
參數 類型 說明
name 字串 指示Experience Platform目錄中目的地的標題。
description 字串 提供說明,讓Adobe將在目的地卡片的Experience Platform目的地目錄中使用該說明。 目標不超過4到5個句子。 顯示目的地說明的平台UI影像。 {width="100" modal="regular"}
status 字串 表示目的地卡片的生命週期狀態。 接受的值為 TESTPUBLISHED、和 DELETED. 使用 TEST 當您首次設定目的地時。
customerAuthenticationConfigurations.authType 字串 表示用於向目的地伺服器驗證Experience Platform客戶的設定。 另請參閱 客戶驗證設定 以取得支援驗證型別的詳細資訊。
customerDataFields.name 字串 為您要介紹的自訂欄位提供名稱。

另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。 顯示客戶資料欄位的平台UI影像。 {width="100" modal="regular"}
customerDataFields.type 字串 指出您要介紹的自訂欄位型別。 接受的值為 stringobjectinteger.

另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。
customerDataFields.title 字串 表示欄位名稱,如客戶在Experience Platform使用者介面中所見。

另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。
customerDataFields.description 字串 提供自訂欄位的說明。 另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。
customerDataFields.isRequired 布林值 指出目的地設定工作流程中是否需要此欄位。

另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。
customerDataFields.enum 字串 將自訂欄位呈現為下拉式功能表,並列出使用者可用的選項。

另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。
customerDataFields.default 字串 從「 」定義預設值 enum 清單。
customerDataFields.pattern 字串 如有需要,強制自訂欄位使用模式。 使用規則運算式強制執行模式。 例如,如果您的客戶ID不包含數字或底線,請輸入 ^[A-Za-z]+$ 在此欄位中。

另請參閱 客戶資料欄位 以取得這些設定的詳細資訊。
uiAttributes.documentationLink 字串 請參閱 目的地目錄 以取得您的目的地。 使用 https://www.adobe.com/go/destinations-YOURDESTINATION-en,其中 YOURDESTINATION 是您目的地的名稱。 針對名為Moviestar的目的地,您可以使用 https://www.adobe.com/go/destinations-moviestar-en. 請注意,此連結只有在Adobe將您的目的地設定為上線並發佈檔案後才有效。

另請參閱 UI屬性 以取得這些設定的詳細資訊。 顯示檔案連結的平台UI影像。 {width="100" modal="regular"}
uiAttributes.category 字串 是指在Adobe Experience Platform中指派給您的目的地的類別。 如需詳細資訊,請閱讀 目的地類別. 使用下列其中一個值: adobeSolutions, advertising, analytics, cdp, cloudStorage, crm, customerSuccess, database, dmp, ecommerce, email, emailMarketing, enrichment, livechat, marketingAutomation, mobile, personalization, protocols, social, streaming, subscriptions, surveys, tagManagers, voc, warehouses, payments.

另請參閱 UI屬性 以取得這些設定的詳細資訊。
uiAttributes.connectionType 字串

連線的型別(視目的地而定)。 支援的值:

  • Server-to-server
  • Cloud storage
  • Azure Blob
  • Azure Data Lake Storage
  • S3
  • SFTP
  • DLZ
uiAttributes.frequency 字串 是指目的地支援的資料匯出型別。 將設為 Streaming 針對API型整合,或 Batch 將檔案匯出至目的地時。
identityNamespaces.externalId.acceptsAttributes 布林值 指出客戶是否可將標準設定檔屬性對應至您正在設定的身分。
identityNamespaces.externalId.acceptsCustomNamespaces 布林值 顯示客戶能否對應屬於的身分 自訂名稱空間 以識別您正在設定的身分。
identityNamespaces.externalId.transformation 字串 未在設定範例中顯示. 例如,用於 Platform 客戶使用純電子郵件地址作為屬性,而您的平台僅接受雜湊電子郵件。 您可以在此處提供需要套用的轉換(例如,將電子郵件轉換為小寫,然後進行雜湊)。
identityNamespaces.externalId.acceptedGlobalNamespaces - 指示哪一個 標準身分名稱空間 (例如,IDFA)客戶可將對應至您正在設定的身分。
當您使用 acceptedGlobalNamespaces,您可以使用 "requiredTransformation":"sha256(lower($))" 至小寫及雜湊電子郵件地址或電話號碼。
destinationDelivery.authenticationRule 字串

指示方式 Platform 客戶連線至您的目的地。 接受的值為 CUSTOMER_AUTHENTICATIONPLATFORM_AUTHENTICATIONNONE.

  • 使用 CUSTOMER_AUTHENTICATION 如果Platform客戶透過使用者名稱和密碼、持有人權杖或其他驗證方法登入您的系統。 例如,如果您也選取了 authType: OAUTH2authType:BEARERcustomerAuthenticationConfigurations.
  • 使用 PLATFORM_AUTHENTICATION 如果Adobe與您的目的地之間有全域驗證系統,而且 Platform 客戶不需要提供任何驗證認證即可連線至您的目的地。 在此情況下,您必須使用 認證API 設定。
  • 使用 NONE 如果不需要驗證即可將資料傳送至您的目的地平台。
destinationDelivery.destinationServerId 字串 instanceId目的地伺服器範本 用於此目的地。
backfillHistoricalProfileData 布林值 控制將受眾啟動至目的地時,是否匯出歷史設定檔資料。 永遠將此專案設為 true.
segmentMappingConfig.mapUserInput 布林值 控制使用者是否輸入目的地啟用工作流程中的對象對應ID。
segmentMappingConfig.mapExperiencePlatformSegmentId 布林值 控制目的地啟動工作流程中的對象對應ID是否為Experience Platform對象ID。
segmentMappingConfig.mapExperiencePlatformSegmentName 布林值 控制目的地啟動工作流程中的對象對應ID是否為Experience Platform對象名稱。
segmentMappingConfig.audienceTemplateId 布林值 instanceId對象中繼資料範本 用於此目的地。
schemaConfig.profileFields 陣列 當您新增預先定義的 profileFields 如上述組態所示,使用者可以選擇將Experience Platform屬性對應至目的地側預先定義的屬性。
schemaConfig.profileRequired 布林值 使用 true 使用者是否應該能夠將設定檔屬性從Experience Platform對應至目的地側的自訂屬性,如上方的設定範例所示。
schemaConfig.segmentRequired 布林值 永遠使用 segmentRequired:true.
schemaConfig.identityRequired 布林值 使用 true 使用者是否應將身分名稱空間從Experience Platform對應至您想要的結構描述。
回應
成功的回應會傳回HTTP狀態200以及您新建立的目的地組態的詳細資料。

API錯誤處理

Destination SDK API端點遵循一般Experience Platform API錯誤訊息原則。 請參閱 API狀態代碼請求標頭錯誤 (位於平台疑難排解指南中)。

後續步驟

閱讀本檔案後,您現在知道如何透過Destination SDK建立新的目的地組態 /authoring/destinations api端點。

若要深入瞭解您可以使用此端點的功能,請參閱下列文章:

若要瞭解此端點適用於目標製作程式的位置,請參閱下列文章:

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