REST Resource: customer.devices.chromeos.commands

Resource: DirectoryChromeosdevicesCommand

Information regarding a command that was issued to a device.

JSON representation
{
  "commandId": string,
  "type": enum (CommandType),
  "issueTime": string,
  "state": enum (State),
  "commandExpireTime": string,
  "commandResult": {
    object (DirectoryChromeosdevicesCommandResult)
  },
  "payload": string
}
Fields
commandId

string (int64 format)

Unique ID of a device command.

type

enum (CommandType)

The type of the command.

issueTime

string (Timestamp format)

The timestamp when the command was issued by the admin.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

state

enum (State)

Indicates the command state.

commandExpireTime

string (Timestamp format)

The time at which the command will expire. If the device doesn't execute the command within this time the command will become expired.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

commandResult

object (DirectoryChromeosdevicesCommandResult)

The result of the command execution.

payload

string

The payload that the command specified, if any.

CommandType

Establishes the type of command the device must execute.

Enums
COMMAND_TYPE_UNSPECIFIED The command type was unspecified.
REBOOT Reboot the device. Can be issued to Kiosk and managed guest session devices, and regular devices running ChromeOS version 113 or later.
TAKE_A_SCREENSHOT Take a screenshot of the device. Only available if the device is in Kiosk Mode.
SET_VOLUME Set the volume of the device. Can only be issued to Kiosk and managed guest session devices.
WIPE_USERS Wipe all the users off of the device. Executing this command in the device will remove all user profile data, but it will keep device policy and enrollment.
REMOTE_POWERWASH Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!
DEVICE_START_CRD_SESSION Starts a Chrome Remote Desktop session.
CAPTURE_LOGS Capture the system logs of a kiosk device. The logs can be downloaded from the downloadUrl link present in deviceFiles field of chromeosdevices
FETCH_SUPPORT_PACKET Fetch support packet from a device remotely. Support packet is a zip archive that contains various system logs and debug data from a ChromeOS device. The support packet can be downloaded from the downloadURL link present in the deviceFiles field of chromeosdevices

State

Represents the state of the issued command.

Enums
STATE_UNSPECIFIED The command status was unspecified.
PENDING An unexpired command not yet sent to the client.
EXPIRED The command didn't get executed by the client within the expected time.
CANCELLED The command is cancelled by admin while in PENDING.
SENT_TO_CLIENT The command has been sent to the client.
ACKED_BY_CLIENT The client has responded that it received the command.
EXECUTED_BY_CLIENT The client has (un)successfully executed the command.

DirectoryChromeosdevicesCommandResult

The result of executing a command.

JSON representation
{
  "result": enum (CommandResultType),
  "executeTime": string,
  "errorMessage": string,
  "commandResultPayload": string
}
Fields
result

enum (CommandResultType)

The result of the command.

executeTime

string (Timestamp format)

The time at which the command was executed or failed to execute.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

errorMessage

string

The error message with a short explanation as to why the command failed. Only present if the command failed.

commandResultPayload

string

The payload for the command result. The following commands respond with a payload:

  • DEVICE_START_CRD_SESSION: Payload is a stringified JSON object in the form: { "url": url }. The URL provides a link to the Chrome Remote Desktop session.

CommandResultType

The type of the command result.

Enums
COMMAND_RESULT_TYPE_UNSPECIFIED The command result was unspecified.
IGNORED The command was ignored as obsolete.
FAILURE The command could not be executed successfully.
SUCCESS The command was successfully executed.

Methods

get

Gets command data a specific command issued to the device.