更新目标配置

此页面展示了可用于使用/authoring/destinations API端点更新现有目标配置的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 SDKAPI端点遵循常规Experience PlatformAPI错误消息原则。 请参阅平台疑难解答指南中的API状态代码请求标头错误

后续步骤

阅读本文档后,您现在知道如何通过Destination SDK/authoring/destinations API端点更新目标配置。

要了解有关可使用此端点执行的操作的更多信息,请参阅以下文章:

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