Skip to main content

commands

Creates, updates, deletes, gets or lists a commands resource.

Overview

Namecommands
TypeResource
Idgoogleadmin.directory.commands

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
commandExpireTimestring (google-datetime)The time at which the command will expire. If the device doesn't execute the command within this time the command will become expired.
commandIdstring (int64)Unique ID of a device command.
commandResultobjectThe result of the command execution. (id: DirectoryChromeosdevicesCommandResult)
issueTimestring (google-datetime)The timestamp when the command was issued by the admin.
payloadstringThe payload that the command specified, if any.
statestringIndicates the command state.
typestringThe type of the command.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomerId, deviceId, commandIdGets command data a specific command issued to the device.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
commandIdstring
customerIdstring
deviceIdstring

SELECT examples

Gets command data a specific command issued to the device.

SELECT
commandExpireTime,
commandId,
commandResult,
issueTime,
payload,
state,
type
FROM googleadmin.directory.commands
WHERE customerId = '{{ customerId }}' -- required
AND deviceId = '{{ deviceId }}' -- required
AND commandId = '{{ commandId }}' -- required;