v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1320176217.8 KB
enterprises

Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.

post/v1/{+name}:issueCommand

Path parameters

namestring required

The name of the device in the form enterprises/{enterpriseId}/devices/{deviceId}.

Request body

errorCode'COMMAND_ERROR_CODE_UNSPECIFIED' | 'UNKNOWN' | 'API_LEVEL' | 'MANAGEMENT_MODE' | 'INVALID_VALUE' | 'UNSUPPORTED'

If the command failed, an error code explaining the failure. This is not set when the command is cancelled by the caller. For reasoning about command errors, prefer fields in the following order (most preferred first): 1. Command-specific fields like clearAppsDataStatus, startLostModeStatus, or similar, if they exist. 2. This field, if set. 3. The generic error field in the Operation that wraps the command.

type'COMMAND_TYPE_UNSPECIFIED' | 'LOCK' | 'RESET_PASSWORD' | 'REBOOT' | 'RELINQUISH_OWNERSHIP' | 'CLEAR_APP_DATA' | 'START_LOST_MODE' | 'STOP_LOST_MODE' | 'ADD_ESIM' | 'REMOVE_ESIM' | 'REQUEST_DEVICE_INFO' | 'WIPE'

The type of the command.

createTimestring google-datetime

The timestamp at which the command was created. The timestamp is automatically generated by the server.

stopLostModeParamsStopLostModeParams

Parameters associated with the STOP_LOST_MODE command to take the device out of lost mode.

durationstring google-duration

The duration for which the command is valid. The command will expire if not executed by the device during this time. The default duration if unspecified is ten minutes. There is no maximum duration.

resetPasswordFlagsstring[]

For commands of type RESET_PASSWORD, optionally specifies flags.

newPasswordstring

For commands of type RESET_PASSWORD, optionally specifies the new password. Note: The new password must be at least 6 characters long if it is numeric in case of Android 14 devices. Else the command will fail with INVALID_VALUE.

userNamestring

The resource name of the user that owns the device in the form enterprises/{enterpriseId}/users/{userId}. This is automatically generated by the server based on the device the command is sent to.

Response

Successful response