Method: users.getCapabilities

取得使用者功能。

HTTP 要求

GET https://drivelabels.googleapis.com/v2/{name=users/*/capabilities}

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

路徑參數

參數
name

string

必要欄位。使用者的資源名稱。目前僅支援「users/me/capabilities」。

查詢參數

參數
customer

string

要將這項要求範圍限定於哪個客戶。例如:customers/abcd1234。如未設定,系統會傳回目前客戶的設定。

要求主體

要求主體必須為空白。

回應主體

使用者的功能。

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

JSON 表示法
{
  "name": string,
  "canAccessLabelManager": boolean,
  "canAdministrateLabels": boolean,
  "canCreateSharedLabels": boolean,
  "canCreateAdminLabels": boolean
}
欄位
name

string

僅供輸出。使用者功能的資源名稱。

canAccessLabelManager

boolean

僅供輸出。使用者是否可存取標籤管理工具。

canAdministrateLabels

boolean

僅供輸出。使用者是否為共用標籤功能的管理員。

canCreateSharedLabels

boolean

僅供輸出。使用者是否可以建立共用標籤。

canCreateAdminLabels

boolean

僅供輸出。使用者是否可以建立管理員標籤。

授權範圍

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

  • https://www.googleapis.com/auth/drive.labels
  • https://www.googleapis.com/auth/drive.labels.readonly
  • https://www.googleapis.com/auth/drive.admin.labels
  • https://www.googleapis.com/auth/drive.admin.labels.readonly

詳情請參閱授權指南