建立認證設定

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

此頁面以範例說明API要求與裝載,您可使用這些API要求與裝載來建立認證組態。 /authoring/credentials api端點。

何時使用 /credentials API端點 when-to-use

IMPORTANT
在大多數情況下,您 不要 需要使用 /credentials api端點。 您可以改為透過以下方式設定目的地的驗證資訊: customerAuthenticationConfigurations 的引數 /destinations 端點。
讀取 客戶驗證設定 以取得支援驗證型別的詳細資訊。

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

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

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

認證API操作快速入門 get-started

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

建立認證設定 create

您可以透過建立 POST 要求給 /authoring/credentials 端點。

API格式

POST /authoring/credentials

以下要求會建立新的認證設定,由承載中提供的引數定義。

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

基本

建立基本認證設定

accordion
請求
code language-shell
curl -X POST https://platform.adobe.io/data/core/activation/authoring/credentials \
 -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"
   }
}
table 0-row-3 1-row-3 2-row-3 3-row-3 layout-auto
參數 類型 說明
url 字串 授權提供者的URL
username 字串 認證組態登入使用者名稱
password 字串 認證組態登入密碼
accordion
回應
成功的回應會傳回HTTP狀態200以及您新建立的認證組態的詳細資料。
Amazon S3

建立 Amazon S3 認證設定

accordion
要求
code language-shell
curl -X POST https://platform.adobe.io/data/core/activation/authoring/credentials \
 -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"
   }
}
table 0-row-3 1-row-3 2-row-3 layout-auto
參數 類型 說明
accessId 字串 Amazon S3 存取識別碼
secretKey 字串 Amazon S3 秘密金鑰
accordion
回應
成功的回應會傳回HTTP狀態200以及您新建立的認證組態的詳細資料。
SSH

建立SSH認證設定

accordion
請求
code language-shell
curl -X POST https://platform.adobe.io/data/core/activation/authoring/credentials \
 -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"
   }
}
table 0-row-3 1-row-3 2-row-3 layout-auto
參數 類型 說明
username 字串 認證組態登入使用者名稱
sshKey 字串 使用SSH驗證的SFTP的SSH金鑰
accordion
回應
成功的回應會傳回HTTP狀態200以及您新建立的認證組態的詳細資料。
Azure Data Lake儲存

建立 Azure Data Lake Storage 認證設定

accordion
請求
code language-shell
curl -X POST https://platform.adobe.io/data/core/activation/authoring/credentials \
 -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"
   }
}
table 0-row-3 1-row-3 2-row-3 3-row-3 4-row-3 layout-auto
參數 類型 說明
url 字串 授權提供者的URL
tenant 字串 Azure Data Lake Storage租使用者
servicePrincipalId 字串 Azure資料湖儲存體的Azure服務主體ID
servicePrincipalKey 字串 Azure Data Lake儲存體的Azure服務主要金鑰
accordion
回應
成功的回應會傳回HTTP狀態200以及您新建立的認證組態的詳細資料。
Azure Blob 儲存體

建立 Azure Blob Storage 認證設定

accordion
請求
code language-shell
curl -X POST https://platform.adobe.io/data/core/activation/authoring/credentials \
 -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"
   }
}
table 0-row-3 1-row-3 layout-auto
參數 類型 說明
connectionString 字串 Azure Blob Storage 連線字串
accordion
回應
成功的回應會傳回HTTP狀態200以及您新建立的認證組態的詳細資料。

API錯誤處理 error-handling

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

後續步驟 next-steps

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

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