Method: projects.locations.userStores.userLicenses.export

將父項 UserStore 底下的所有 UserLicense 匯出為單一 CSV 文件。這是管理控制台「下載為 CSV」動作的後端,會重複使用 userLicenses.list 讀取路徑,因此管理員可以在 Excel 或 Google 試算表中離線排序/篩選。

回應會在 ExportUserLicensesResponse.csv_data 中內嵌完整 CSV 檔案 (標頭列,後接資料列)。

HTTP 要求


POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/userStores/*}/userLicenses:export

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

路徑參數

參數
parent

string

這是必要旗標,父項 UserStore 資源名稱,格式為 projects/{project}/locations/{location}/userStores/{userStoreId}。系統會匯出這個 UserStore 下的所有 UserLicense。

要求主體

要求主體必須為空白。

回應主體

UserLicenseService.ExportUserLicenses 的回應訊息。

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

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "csvData": string
  // End of mutually exclusive fields.
}
欄位
匯出的結果。M1 會在 csv_data 中內嵌傳回 CSV;oneof 會保留空間,供日後使用大型匯出變體 (例如 GCS URI),而不會破壞合約。以下列出互斥欄位。回應中最多會設定一個欄位:
csvData

string (bytes format)

以原始位元組形式呈現的完整 CSV 文件:標頭列,後面接著每個 UserLicense 各一列。內含使用者授權資料 (例如使用者電子郵件)。如果沒有相符的授權,匯出檔案只會包含標題列。

Base64 編碼字串。

互斥欄位的結尾。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.serving.readwrite

詳情請參閱Authentication Overview。

IAM 權限

需要 parent 資源的下列 IAM 權限:

  • discoveryengine.userStores.listUserLicenses

詳情請參閱 IAM 說明文件。