Method: media.upload

根據使用者提供的內容建立 Enterprise 檔案。傳回使用者的公開下載網址。

HTTP 要求

  • 上傳 URI,適用於媒體上傳要求:
    POST https://chromepolicy.googleapis.com/upload/v1/{customer=customers/*}/policies/files:uploadPolicyFile
  • 中繼資料 URI,適用於僅限中繼資料的要求:
    POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/files:uploadPolicyFile

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
customer

string

必要欄位。檔案上傳的目標客戶。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "policyField": string
}
欄位
policyField

string

必要欄位。上傳檔案的完整政策架構和欄位名稱。這些資訊會用於驗證檔案的內容類型。

回應主體

如果成功,回應主體即會包含具有以下結構的資料:

下載檔案後的回應訊息。

JSON 表示法
{
  "downloadUri": string
}
欄位
downloadUri

string

供使用者下載檔案的 URI。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/chrome.management.policy