更新認證設定

重要

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

此頁面以範例說明API請求和裝載,您可使用這些API請求和裝載來更新現有的認證設定。 /authoring/credentials api端點。

何時使用 /credentials API端點

重要

在大多數情況下,您 不要 需要使用 /credentials api端點。 您可以改為透過以下方式設定目的地的驗證資訊: customerAuthenticationConfigurations 的引數 /destinations 端點。

讀取 客戶驗證設定 以取得支援驗證型別的詳細資訊。

只有在Adobe和您的目的地平台之間存在全域驗證系統,而且 Platform 客戶不需要提供任何驗證認證即可連線至您的目的地。 在此情況下,您必須使用 /credentials api端點。

使用全域驗證系統時,您必須設定 "authenticationRule":"PLATFORM_AUTHENTICATION"目的地傳遞 設定,當 建立新的目的地組態.

重要

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

認證API操作快速入門

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

更新認證設定

您可以更新 現有 認證設定,透過發出 PUT 向以下專案提出的請求: /authoring/credentials 具有已更新裝載的端點。

若要取得現有的認證設定及其對應的 {INSTANCE_ID},請參閱這篇文章,瞭解 擷取認證設定.

API格式

PUT /authoring/credentials/{INSTANCE_ID}
參數 說明
{INSTANCE_ID} 您要更新的認證設定ID。 若要取得現有的認證設定及其對應的 {INSTANCE_ID},請參閱 擷取認證設定.

以下請求會更新由承載中提供的引數定義的現有認證設定。

選取下方的每個索引標籤以檢視對應的裝載。

更新基本認證設定

 請求
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/credentials/{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 '
{
    "basicAuthentication":{
      "url":"string",
      "username":"string",
      "password":"string"
   }
}
參數 類型 說明
url 字串 授權提供者的URL
username 字串 認證設定登入使用者名稱
password 字串 認證組態登入密碼
 回應

成功的回應會傳回HTTP狀態200以及您更新之認證設定的詳細資料。

更新 Amazon S3 認證設定

 請求
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/credentials/{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 '
{
   "s3Authentication":{
      "accessId":"string",
      "secretKey":"string"
   }
}
參數 類型 說明
accessId 字串 Amazon S3 存取識別碼
secretKey 字串 Amazon S3 秘密金鑰
 回應

成功的回應會傳回HTTP狀態200以及您更新之認證設定的詳細資料。

更新 SSH 認證設定

 請求
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/credentials/{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 '
{
    "sshAuthentication":{
      "username":"string",
      "sshKey":"string"
   }
}
參數 類型 說明
username 字串 認證設定登入使用者名稱
sshKey 字串 SSH 索引鍵: SFTP 替換為 SSH 驗證
 回應

成功的回應會傳回HTTP狀態200以及您更新之認證設定的詳細資料。

更新 Azure Data Lake Storage 認證設定

 請求
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/credentials/{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 '
{
    "azureAuthentication":{
      "url":"string",
      "tenant":"string",
      "servicePrincipalId":"string",
      "servicePrincipalKey":"string"
   }
}
參數 類型 說明
url 字串 授權提供者的URL
tenant 字串 Azure Data Lake儲存體租使用者
servicePrincipalId 字串 Azure Service Principal ID for Azure Data Lake Storage
servicePrincipalKey 字串 Azure Service Principal Key for Azure Data Lake Storage
 回應

成功的回應會傳回HTTP狀態200以及您更新之認證設定的詳細資料。

更新 Azure Blob 認證設定

 請求
curl -X PUT https://platform.adobe.io/data/core/activation/authoring/credentials/{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 '
{
    "azureConnectionStringAuthentication":{
      "connectionString":"string"
   }
}
參數 類型 說明
connectionString 字串 Azure Blob Storage 連線字串
 回應

成功的回應會傳回HTTP狀態200以及您更新之認證設定的詳細資料。

API錯誤處理

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

後續步驟

閱讀本檔案後,您現在知道如何使用 /authoring/credentials api端點。 讀取 如何使用Destination SDK設定您的目的地 以瞭解此步驟在設定目的地的程式中的適用位置。

本頁內容