此頁面以範例說明可用於更新現有目的地伺服器設定的API請求和裝載,使用 /authoring/destination-servers
api端點。
生產/公開目的地上的任何更新操作只有在您使用 發佈API 並提交更新以供Adobe檢閱。
如需可透過此端點設定的功能的詳細說明,請參閱以下文章:
Destination SDK支援的所有引數名稱和值如下 區分大小寫. 為避免區分大小寫錯誤,請完全依照檔案中所示使用引數名稱和值。
在繼續之前,請檢閱 快速入門手冊 如需您成功呼叫API所需的重要資訊,包括如何取得必要的目的地撰寫許可權和必要的標頭。
您可以更新 現有 目標伺服器組態,透過設定 PUT
要求給 /authoring/destination-servers
具有已更新裝載的端點。
API端點: platform.adobe.io/data/core/activation/authoring/destination-servers
若要取得現有的目的地伺服器組態及其對應組態 {INSTANCE_ID}
,請參閱「 」一文,瞭解 擷取目的地伺服器組態.
API格式
PUT /authoring/destination-servers/{INSTANCE_ID}
參數 | 說明 |
---|---|
{INSTANCE_ID} |
您要更新的目的地伺服器組態ID。 若要取得現有的目的地伺服器組態及其對應組態 {INSTANCE_ID} ,請參閱 擷取目的地伺服器設定. |
以下要求會更新現有的目的地伺服器設定,此設定由承載中提供的引數所設定。
選取下方的每個索引標籤以檢視對應的裝載。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers\{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":"Moviestar destination server",
"destinationServerType":"URL_BASED",
"urlBasedDestination":{
"url":{
"templatingStrategy":"PEBBLE_V1",
"value":"https://api.moviestar.com/data/{{customerData.region}}/items"
}
},
"httpTemplate":{
"httpMethod":"PUT",
"requestBody":{
"templatingStrategy":"PEBBLE_V1",
"value":"{ \"attributes\": [ {% for ns in [\"external_id\", \"yourdestination_id\"] %} {% if input.profile.identityMap[ns] is not empty and first_namespace_encountered %} , {% endif %} {% set first_namespace_encountered = true %} {% for identity in input.profile.identityMap[ns]%} { \"{{ ns }}\": \"{{ identity.id }}\" {% if input.profile.segmentMembership.ups is not empty %} , \"AEPSegments\": { \"add\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"realized\" or segment.value.status == \"existing\" %} {% if added_segment_found %} , {% endif %} {% set added_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ], \"remove\": [ {% for segment in input.profile.segmentMembership.ups %} {% if segment.value.status == \"exited\" %} {% if removed_segment_found %} , {% endif %} {% set removed_segment_found = true %} \"{{ destination.segmentAliases[segment.key] }}\" {% endif %} {% endfor %} ] } {% set removed_segment_found = false %} {% set added_segment_found = false %} {% endif %} {% if input.profile.attributes is not empty %} , {% endif %} {% for attribute in input.profile.attributes %} \"{{ attribute.key }}\": {% if attribute.value is empty %} null {% else %} \"{{ attribute.value.value }}\" {% endif %} {% if not loop.last%} , {% endif %} {% endfor %} } {% if not loop.last %} , {% endif %} {% endfor %} {% endfor %} ] }"
},
"contentType":"application/json"
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 必要. 代表伺服器的易記名稱,僅對Adobe可見。 合作夥伴或客戶看不到此名稱。 範例 Moviestar destination server . |
destinationServerType |
字串 | 必要. 將設為 URL_BASED 適用於即時(串流)目的地。 |
urlBasedDestination.url.templatingStrategy |
字串 | 必要.
|
urlBasedDestination.url.value |
字串 | 必要. 填寫Experience Platform應連線的API端點位址。 |
httpTemplate.httpMethod |
字串 | 必要. Adobe將在對伺服器呼叫中使用的方法。 選項包括 GET , PUT , PUT , DELETE , PATCH . |
httpTemplate.requestBody.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
httpTemplate.requestBody.value |
字串 | 必要. 此字串是字元逸出版本,可將Platform客戶的資料轉換為您的服務預期格式。
|
httpTemplate.contentType |
字串 | 必要. 您的伺服器接受的內容型別。 此值極有可能 application/json . |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers\{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": "S3 destination",
"destinationServerType": "FILE_BASED_S3",
"fileBasedS3Destination": {
"bucket": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.bucket}}"
},
"path": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.path}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 目的地連線的名稱。 |
destinationServerType |
字串 | 根據您的目的地平台設定此值。 的 Amazon S3,將此設為 FILE_BASED_S3 . |
fileBasedS3Destination.bucket.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedS3Destination.bucket.value |
字串 | 的名稱 Amazon S3 要由此目的地使用的貯體。 |
fileBasedS3Destination.path.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedS3Destination.path.value |
字串 | 目的地資料夾的路徑,此資料夾將裝載匯出的檔案。 |
fileConfigurations |
不適用 | 另請參閱 檔案格式設定 以取得如何設定這些設定的詳細資訊。 |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers/{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":"File-based SFTP destination server",
"destinationServerType":"FILE_BASED_SFTP",
"fileBasedSFTPDestination":{
"rootDirectory":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.rootDirectory}}"
},
"port": 22,
"encryptionMode" : "PGP"
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 目的地連線的名稱。 |
destinationServerType |
字串 | 根據您的目的地平台設定此值。 的 SFTP 目的地,將此專案設為 FILE_BASED_SFTP . |
fileBasedSFTPDestination.rootDirectory.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedSFTPDestination.rootDirectory.value |
字串 | 目的地儲存體的根目錄。 |
fileBasedSFTPDestination.hostName.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedSFTPDestination.hostName.value |
字串 | 目的地儲存體的主機名稱。 |
port |
整數 | SFTP檔案伺服器連線埠。 |
encryptionMode |
字串 | 指示是否使用檔案加密。 支援的值:
|
fileConfigurations |
不適用 | 另請參閱 檔案格式設定 以取得如何設定這些設定的詳細資訊。 |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers/{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":"ADLS destination server",
"destinationServerType":"FILE_BASED_ADLS_GEN2",
"fileBasedAdlsGen2Destination":{
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 目的地連線的名稱。 |
destinationServerType |
字串 | 根據您的目的地平台設定此值。 的 Azure Data Lake Storage 目的地,將此專案設為 FILE_BASED_ADLS_GEN2 . |
fileBasedAdlsGen2Destination.path.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedAdlsGen2Destination.path.value |
字串 | 目的地資料夾的路徑,此資料夾將裝載匯出的檔案。 |
fileConfigurations |
不適用 | 另請參閱 檔案格式設定 以取得如何設定這些設定的詳細資訊。 |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers/{INSTANCE_D} \
-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":"Blob destination server",
"destinationServerType":"FILE_BASED_AZURE_BLOB",
"fileBasedAzureBlobDestination":{
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
},
"container":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.container}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 目的地連線的名稱。 |
destinationServerType |
字串 | 根據您的目的地平台設定此值。 的 Azure Blob Storage 目的地,將此專案設為 FILE_BASED_AZURE_BLOB . |
fileBasedAzureBlobDestination.path.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedAzureBlobDestination.path.value |
字串 | 目的地資料夾的路徑,此資料夾將裝載匯出的檔案。 |
fileBasedAzureBlobDestination.container.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedAzureBlobDestination.container.value |
字串 | 的名稱 Azure Blob Storage 此目的地要使用的容器。 |
fileConfigurations |
不適用 | 另請參閱 檔案格式設定 以取得如何設定這些設定的詳細資訊。 |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers/{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":"DLZ destination server",
"destinationServerType":"FILE_BASED_DLZ",
"fileBasedDlzDestination":{
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
},
"useCase": "Your use case"
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 目的地連線的名稱。 |
destinationServerType |
字串 | 根據您的目的地平台設定此值。 的 Data Landing Zone 目的地,將此專案設為 FILE_BASED_DLZ . |
fileBasedDlzDestination.path.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedDlzDestination.path.value |
字串 | 目的地資料夾的路徑,此資料夾將裝載匯出的檔案。 |
fileConfigurations |
不適用 | 另請參閱 檔案格式設定 以取得如何設定這些設定的詳細資訊。 |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/destination-servers/{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":"Google Cloud Storage Server",
"destinationServerType":"FILE_BASED_GOOGLE_CLOUD",
"fileBasedGoogleCloudStorageDestination":{
"bucket":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.bucket}}"
},
"path":{
"templatingStrategy":"PEBBLE_V1",
"value":"{{customerData.path}}"
}
},
"fileConfigurations": {
"compression": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.compression}}"
},
"fileType": {
"templatingStrategy": "PEBBLE_V1",
"value": "{{customerData.fileType}}"
},
"csvOptions": {
"quote": {
"templatingStrategy": "NONE",
"value": "\""
},
"quoteAll": {
"templatingStrategy": "NONE",
"value": "false"
},
"escape": {
"templatingStrategy": "NONE",
"value": "\\"
},
"escapeQuotes": {
"templatingStrategy": "NONE",
"value": "true"
},
"header": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreLeadingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"ignoreTrailingWhiteSpace": {
"templatingStrategy": "NONE",
"value": "true"
},
"nullValue": {
"templatingStrategy": "NONE",
"value": ""
},
"dateFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd"
},
"timestampFormat": {
"templatingStrategy": "NONE",
"value": "yyyy-MM-dd'T':mm:ss[.SSS][XXX]"
},
"charToEscapeQuoteEscaping": {
"templatingStrategy": "NONE",
"value": "\\"
},
"emptyValue": {
"templatingStrategy": "NONE",
"value": ""
}
}
}
}
參數 | 類型 | 說明 |
---|---|---|
name |
字串 | 目的地連線的名稱。 |
destinationServerType |
字串 | 根據您的目的地平台設定此值。 的 Google Cloud Storage 目的地,將此專案設為 FILE_BASED_GOOGLE_CLOUD . |
fileBasedGoogleCloudStorageDestination.bucket.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedGoogleCloudStorageDestination.bucket.value |
字串 | 的名稱 Google Cloud Storage 要由此目的地使用的貯體。 |
fileBasedGoogleCloudStorageDestination.path.templatingStrategy |
字串 | 必要. 使用 PEBBLE_V1 . |
fileBasedGoogleCloudStorageDestination.path.value |
字串 | 目的地資料夾的路徑,此資料夾將裝載匯出的檔案。 |
fileConfigurations |
不適用 | 另請參閱 檔案格式設定 以取得如何設定這些設定的詳細資訊。 |
成功的回應會傳回HTTP狀態200以及您更新的目的地伺服器組態的詳細資料。
Destination SDK API端點遵循一般Experience Platform API錯誤訊息原則。 請參閱 API狀態代碼 和 請求標頭錯誤 (位於平台疑難排解指南中)。
閱讀本檔案後,您現在知道如何透過Destination SDK更新目的地伺服器設定 /authoring/destination-servers
api端點。
若要深入瞭解您可以使用此端點的功能,請參閱下列文章: