Method: customer.devices.chromeos.issueCommand

發出指令,讓裝置執行。

HTTP 要求

POST https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand

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

路徑參數

參數
customerId

string

無法變更。Google Workspace 帳戶的 ID。

deviceId

string

無法變更。Chrome OS 裝置的 ID。

要求主體

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

JSON 表示法
{
  "commandType": enum (CommandType),
  "payload": string
}
欄位
commandType

enum (CommandType)

指令類型。

payload

string

指令的酬載,僅在指令支援時提供。下列指令支援新增酬載:

  • SET_VOLUME:酬載為字串的 JSON 物件,格式為 { "volume": 50 }。磁碟區必須是介於 [0,100] 之間的整數。
  • DEVICE_START_CRD_SESSION:酬載是選用字串的 JSON 物件,格式如下:{ "ackedUserPresence": true }。ackedUserPresence 是布林值。ackedUserPresence 預設為 false。如要針對使用中的裝置啟動 Chrome 遠端桌面工作階段,請將 ackedUserPresence 設為 true

回應主體

發出指令的回應。

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

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

string (int64 format)

所發出指令的專屬 ID,用於擷取指令狀態。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/admin.directory.device.chromeos

詳情請參閱授權指南