更新目的地設定

此頁面以範例說明API要求與裝載,您可以使用/authoring/destinations API端點來更新現有的目的地組態。

TIP
只有在您使用發佈API並提交更新以供Adobe稽核後,才可看見生產/公開目的地上的任何更新操作。

如需目的地組態功能的詳細說明,請參閱下列文章:

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

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

繼續之前,請檢閱快速入門手冊以取得重要資訊,您必須瞭解這些資訊才能成功呼叫API,包括如何取得必要的目的地撰寫許可權和必要的標頭。

更新目的地設定 update

您可以透過對具有更新承載的/authoring/destinations端點發出PUT請求來更新現有目的地設定。

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

若要取得現有的目的地組態及其對應的{INSTANCE_ID},請參閱有關擷取目的地組態的文章。

API格式

PUT /authoring/destinations/{INSTANCE_ID}
參數
說明
{INSTANCE_ID}
您要更新之目的地設定的ID。 若要取得現有的目的地組態及其對應的{INSTANCE_ID},請參閱擷取目的地組態
要求

下列要求會以不同的filenameConfig選項更新我們在此範例中建立的目的地。

code language-shell line-numbers h-115-128
curl -X POST https://platform.adobe.io/data/core/activation/authoring/destinations/{INSTANCE_ID} \
 -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"
      }
   ],
   "customerEncryptionConfigurations":[

   ],
   "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":"File type",
         "description":"Select the exported file type.",
         "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",
         "ONCE"
      ],
      "defaultFrequency":"DAILY",
      "defaultStartTime":"00:00",
      "filenameConfig":{
         "allowedFilenameAppendOptions":[
            "SEGMENT_NAME",
            "DESTINATION_INSTANCE_NAME",
            "ORGANIZATION_NAME",
            "SANDBOX_NAME",
            "DATETIME",
            "CUSTOM_TEXT"
         ],
         "defaultFilenameAppendOptions":[
            "DATETIME"
         ],
         "defaultFilename":"%DESTINATION%_%SEGMENT_ID%_%DESTINATION_INSTANCE_ID%,"
      },
      "backfillHistoricalProfileData":true
   }
}'
回應
成功的回應會傳回HTTP狀態200以及已更新目的地設定的詳細資料。

API錯誤處理 error-handling

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

後續步驟

閱讀此檔案後,您現在知道如何透過Destination SDK/authoring/destinations API端點更新目的地設定。

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

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