- [HTTP request](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#body.request_body)
- [Response body](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#body.response_body)
- [Authorization scopes](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#body.aspect)
- [Command](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.SCHEMA_REPRESENTATION)
- [CommandType](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType)
- [CommandErrorCode](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandErrorCode)
- [ResetPasswordFlag](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ResetPasswordFlag)
- [ClearAppsDataParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataParams)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataParams.SCHEMA_REPRESENTATION)
- [StartLostModeParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeParams)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeParams.SCHEMA_REPRESENTATION)
- [StopLostModeParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeParams)
- [AddEsimParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#AddEsimParams)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#AddEsimParams.SCHEMA_REPRESENTATION)
- [ActivationState](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState)
- [RemoveEsimParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RemoveEsimParams)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RemoveEsimParams.SCHEMA_REPRESENTATION)
- [RequestDeviceInfoParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoParams)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoParams.SCHEMA_REPRESENTATION)
- [DeviceInfo](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#DeviceInfo)
- [WipeParams](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#WipeParams)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#WipeParams.SCHEMA_REPRESENTATION)
- [ClearAppsDataStatus](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataStatus)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataStatus.SCHEMA_REPRESENTATION)
- [PerAppResult](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#PerAppResult)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#PerAppResult.SCHEMA_REPRESENTATION)
- [ClearingResult](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearingResult)
- [StartLostModeStatus](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus.SCHEMA_REPRESENTATION)
- [Status](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status)
- [StopLostModeStatus](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus.SCHEMA_REPRESENTATION)
- [Status](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_1)
- [EsimCommandStatus](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus.SCHEMA_REPRESENTATION)
- [Status](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_2)
- [InternalErrorDetails](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.SCHEMA_REPRESENTATION)
- [OperationCodeDetail](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#OperationCodeDetail)
- [ErrorCodeDetail](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ErrorCodeDetail)
- [EsimInfo](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimInfo)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimInfo.SCHEMA_REPRESENTATION)
- [RequestDeviceInfoStatus](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoStatus)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoStatus.SCHEMA_REPRESENTATION)
- [Status](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_3)
- [EidInfo](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EidInfo)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EidInfo.SCHEMA_REPRESENTATION)
- [Eid](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Eid)
  - [JSON representation](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Eid.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#try-it)

Issues a command to a device. The [`Operation`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices.operations#Operation) resource returned contains a [`Command`](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command) in its `metadata` field. Use the [get operation method](https://developers.google.com/android/management/reference/rest/v1/enterprises.devices.operations/get) to get the status of the command.

### HTTP request

`POST https://androidmanagement.googleapis.com/v1/{name=enterprises/*/devices/*}:issueCommand`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` The name of the device in the form `enterprises/{enterpriseId}/devices/{deviceId}`. |

### Request body

The request body contains an instance of `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command`.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/androidmanagement`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## Command

A command.

| JSON representation |
|---|
| ``` { "type": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType`), "createTime": string, "duration": string, "userName": string, "errorCode": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandErrorCode`), "newPassword": string, "resetPasswordFlags": [ enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ResetPasswordFlag`) ], // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "clearAppsDataParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataParams`) }, "startLostModeParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeParams`) }, "stopLostModeParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeParams`) }, "addEsimParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#AddEsimParams`) }, "removeEsimParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RemoveEsimParams`) }, "requestDeviceInfoParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoParams`) }, "wipeParams": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#WipeParams`) } // End of mutually exclusive fields. // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "clearAppsDataStatus": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataStatus`) }, "startLostModeStatus": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus`) }, "stopLostModeStatus": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus`) }, "esimStatus": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus`) }, "requestDeviceInfoStatus": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoStatus`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType`)`` The type of the command. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` The timestamp at which the command was created. The timestamp is automatically generated by the server. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `duration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` 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. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `userName` | `string` 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. |
| `errorCode` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandErrorCode`)`` 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 `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.clear_apps_data_status`, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.start_lost_mode_status`, or similar, if they exist. 2. This field, if set. 3. The generic `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices.operations#Operation.FIELDS.error` field in the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices.operations#Operation` that wraps the command. |
| `newPassword` | `string` 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 `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandErrorCode.ENUM_VALUES.INVALID_VALUE`. |
| `resetPasswordFlags[]` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ResetPasswordFlag`)`` For commands of type `RESET_PASSWORD`, optionally specifies flags. |
| Parameters specific to the command. Note that some commands do not use this, in particular `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.LOCK`, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.RESET_PASSWORD`, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REBOOT`, and `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.RELINQUISH_OWNERSHIP`. In future these commands may use this as well. If this is set, then the fields `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.new_password` and `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.reset_password_flags` must not be set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `clearAppsDataParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataParams`)`` Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.CLEAR_APP_DATA` command to clear the data of specified apps from the device. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataParams`. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.CLEAR_APP_DATA`. It is also acceptable to explicitly set `type` to `CLEAR_APP_DATA`. |
| `startLostModeParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeParams`)`` Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.START_LOST_MODE` command to put the device into lost mode. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeParams`. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.START_LOST_MODE`. It is also acceptable to explicitly set `type` to `START_LOST_MODE`. |
| `stopLostModeParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeParams`)`` Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.STOP_LOST_MODE` command to take the device out of lost mode. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeParams`. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.STOP_LOST_MODE`. It is also acceptable to explicitly set `type` to `STOP_LOST_MODE`. |
| `addEsimParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#AddEsimParams`)`` Optional. Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` command to add an eSIM profile to the device. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM`. It is also acceptable to explicitly set `type` to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM`. |
| `removeEsimParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RemoveEsimParams`)`` Optional. Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command to remove an eSIM profile from the device. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM`. It is also acceptable to explicitly set `type` to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM`. |
| `requestDeviceInfoParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoParams`)`` Optional. Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` command to get device related information. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` . It is also acceptable to explicitly set `type` to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO`. |
| `wipeParams` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#WipeParams`)`` Optional. Parameters for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.WIPE` command to wipe the device. If this is set, then it is suggested that `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.type` should not be set. In this case, the server automatically sets it to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.WIPE`. It is also acceptable to explicitly set `type` to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.WIPE`. |
| End of mutually exclusive fields. ||
| Status specific to the command. Note that some commands do not use this, in particular `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.LOCK`, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.RESET_PASSWORD`, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REBOOT`, and `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.RELINQUISH_OWNERSHIP`. In future these commands may use this as well. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `clearAppsDataStatus` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataStatus`)`` Output only. Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.CLEAR_APP_DATA` command to clear the data of specified apps from the device. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearAppsDataStatus`. |
| `startLostModeStatus` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus`)`` Output only. Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.START_LOST_MODE` command to put the device into lost mode. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus`. |
| `stopLostModeStatus` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus`)`` Output only. Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.STOP_LOST_MODE` command to take the device out of lost mode. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus`. |
| `esimStatus` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus`)`` Output only. Status of an `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` or `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command. |
| `requestDeviceInfoStatus` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoStatus`)`` Output only. Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` command. |
| End of mutually exclusive fields. ||

## CommandType

Types of commands.

| Enums ||
|---|---|
| `COMMAND_TYPE_UNSPECIFIED` | This value is disallowed. |
| `LOCK` | Lock the device, as if the lock screen timeout had expired. For a work profile, if there is a separate work profile lock, this only locks the work profile, with one exception: on work profiles on an organization-owned device running Android 8, 9, or 10, this locks the entire device. |
| `RESET_PASSWORD` | Reset the user's password. |
| `REBOOT` | Reboot the device. Only supported on fully managed devices running Android 7.0 (API level 24) or higher. |
| `RELINQUISH_OWNERSHIP` | Removes the work profile and all policies from a company-owned Android 8.0+ device, relinquishing the device for personal use. Apps and data associated with the personal profile(s) are preserved. The device will be deleted from the server after it acknowledges the command. |
| `CLEAR_APP_DATA` | Clears the application data of specified apps. This is supported on Android 9 and above. Note that an application can store data outside of its application data, for example in external storage or in a user dictionary. See also `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.clear_apps_data_params`. |
| `START_LOST_MODE` | Puts the device into lost mode. Only supported on fully managed devices or organization-owned devices with a managed profile. See also `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.start_lost_mode_params`. |
| `STOP_LOST_MODE` | Takes the device out of lost mode. Only supported on fully managed devices or organization-owned devices with a managed profile. See also `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.stop_lost_mode_params`. |
| `ADD_ESIM` | Adds an eSIM profile to the device. This is supported on Android 15 and above. See also `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.add_esim_params`. To remove an eSIM profile, use the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command. Note that `REMOVE_ESIM` is not supported on company-owned devices with a work profile running Android 16 QPR2 or Android 16 QPR3. To determine what happens to the eSIM profile when a device is wiped, set `https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#Policy.FIELDS.wipe_data_flags` in the policy. Note: To provision multiple eSIMs on a single device, it is recommended to introduce a delay of a few minutes between successive executions of the command. |
| `REMOVE_ESIM` | Removes an eSIM profile from the device. This is supported on Android 15 and above. This command is not supported on company-owned devices with a work profile running Android 16 QPR2 or Android 16 QPR3. See also `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Command.FIELDS.remove_esim_params`. |
| `REQUEST_DEVICE_INFO` | Request information related to the device. |
| `WIPE` | Wipes the device, via a factory reset for a company owned device, or by deleting the work profile for a personally owned device with work profile. The wipe only occurs once the device acknowledges the command. The command can be cancelled before then. |

## CommandErrorCode

A command error code. This is a read-only field populated by the server.

| Enums ||
|---|---|
| `COMMAND_ERROR_CODE_UNSPECIFIED` | There was no error. |
| `UNKNOWN` | An unknown error occurred. |
| `API_LEVEL` | The API level of the device does not support this command. |
| `MANAGEMENT_MODE` | The management mode (profile owner, device owner, etc.) does not support the command. |
| `INVALID_VALUE` | The command has an invalid parameter value. |
| `UNSUPPORTED` | The device doesn't support the command. Updating Android Device Policy to the latest version may resolve the issue. |

## ResetPasswordFlag

Flags that can be used for the `RESET_PASSWORD` command type.

| Enums ||
|---|---|
| `RESET_PASSWORD_FLAG_UNSPECIFIED` | This value is ignored. |
| `REQUIRE_ENTRY` | Don't allow other admins to change the password again until the user has entered it. |
| `DO_NOT_ASK_CREDENTIALS_ON_BOOT` | Don't ask for user credentials on device boot. |
| `LOCK_NOW` | Lock the device after password reset. |

## ClearAppsDataParams

Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.CLEAR_APP_DATA` command to clear the data of specified apps from the device.

| JSON representation |
|---|
| ``` { "packageNames": [ string ] } ``` |

| Fields ||
|---|---|
| `packageNames[]` | `string` The package names of the apps whose data will be cleared when the command is executed. |

## StartLostModeParams

Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.START_LOST_MODE` command to put the device into lost mode. At least one of the parameters, not including the organization name, must be provided in order for the device to be put into lost mode.

| JSON representation |
|---|
| ``` { "lostMessage": { object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`) }, "lostPhoneNumber": { object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`) }, "lostEmailAddress": string, "lostStreetAddress": { object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`) }, "lostOrganization": { object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`) } } ``` |

| Fields ||
|---|---|
| `lostMessage` | ``object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`)`` The message displayed to the user when the device is in lost mode. |
| `lostPhoneNumber` | ``object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`)`` The phone number that will be called when the device is in lost mode and the call owner button is tapped. |
| `lostEmailAddress` | `string` The email address displayed to the user when the device is in lost mode. |
| `lostStreetAddress` | ``object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`)`` The street address displayed to the user when the device is in lost mode. |
| `lostOrganization` | ``object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`)`` The organization name displayed to the user when the device is in lost mode. |

## StopLostModeParams

This type has no fields.
Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.STOP_LOST_MODE` command to take the device out of lost mode.

## AddEsimParams

Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` command to add an eSIM profile to the device.

| JSON representation |
|---|
| ``` { "activationCode": string, "activationState": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState`) } ``` |

| Fields ||
|---|---|
| `activationCode` | `string` Required. The activation code for the eSIM profile. |
| `activationState` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState`)`` Required. The activation state of the eSIM profile once it is downloaded. |

## ActivationState

The activation state of the eSIM profile once it is downloaded.

| Enums ||
|---|---|
| `ACTIVATION_STATE_UNSPECIFIED` | eSIM activation state is not specified. This defaults to the eSIM profile being `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState.ENUM_VALUES.NOT_ACTIVATED` on personally-owned devices and `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState.ENUM_VALUES.ACTIVATED` on company-owned devices. |
| `ACTIVATED` | The eSIM is automatically activated after downloading. Setting this as the activation state for personally-owned devices will result in the command being rejected. |
| `NOT_ACTIVATED` | The eSIM profile is downloaded but not activated. In this case, the user will need to activate the eSIM manually on the device. |

## RemoveEsimParams

Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command to remove an eSIM profile from the device.

| JSON representation |
|---|
| ``` { "iccId": string } ``` |

| Fields ||
|---|---|
| `iccId` | `string` Required. ICC ID of the eSIM profile to be deleted. |

## RequestDeviceInfoParams

Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` command to get device related information.

| JSON representation |
|---|
| ``` { "deviceInfo": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#DeviceInfo`) } ``` |

| Fields ||
|---|---|
| `deviceInfo` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#DeviceInfo`)`` Required. Type of device information to be requested. |

## DeviceInfo

Type of device information to be requested.

| Enums ||
|---|---|
| `DEVICE_INFO_UNSPECIFIED` | This value is disallowed. |
| `EID` | Request the identifier for eSIM. The user will be asked to approve the disclosure of the information before the result can be returned. If the user doesn't approve the disclosure, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_3.ENUM_VALUES.USER_DECLINED` will be returned. This is supported only for personally owned devices with work profiles and Android versions 13 and above. |

## WipeParams

Parameters associated with the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.WIPE` command to wipe the device.

| JSON representation |
|---|
| ``` { "wipeDataFlags": [ enum (`https://developers.google.com/android/management/reference/rest/v1/WipeDataFlag`) ], "wipeReason": { object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`) } } ``` |

| Fields ||
|---|---|
| `wipeDataFlags[]` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/WipeDataFlag`)`` Optional. Flags to determine what data to wipe. |
| `wipeReason` | ``object (`https://developers.google.com/android/management/reference/rest/v1/UserFacingMessage`)`` Optional. A short message displayed to the user before wiping the work profile on personal devices. This has no effect on company owned devices. The maximum message length is 200 characters. |

## ClearAppsDataStatus

Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.CLEAR_APP_DATA` command to clear the data of specified apps from the device.

| JSON representation |
|---|
| ``` { "results": { string: { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#PerAppResult`) }, ... } } ``` |

| Fields ||
|---|---|
| `results` | ``map (key: string, value: object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#PerAppResult`))`` The per-app results, a mapping from package names to the respective clearing result. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## PerAppResult

The result of an attempt to clear the data of a single app.

| JSON representation |
|---|
| ``` { "clearingResult": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearingResult`) } ``` |

| Fields ||
|---|---|
| `clearingResult` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ClearingResult`)`` The result of an attempt to clear the data of a single app. |

## ClearingResult

The result of an attempt to clear the data of a single app.

| Enums ||
|---|---|
| `CLEARING_RESULT_UNSPECIFIED` | Unspecified result. |
| `SUCCESS` | This app's data was successfully cleared. |
| `APP_NOT_FOUND` | This app's data could not be cleared because the app was not found. |
| `APP_PROTECTED` | This app's data could not be cleared because the app is protected. For example, this may apply to apps critical to the functioning of the device, such as Google Play Store. |
| `API_LEVEL` | This app's data could not be cleared because the device API level does not support this command. |

## StartLostModeStatus

Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.START_LOST_MODE` command to put the device into lost mode.

| JSON representation |
|---|
| ``` { "status": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status`) } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status`)`` The status. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus`. |

## Status

The status. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StartLostModeStatus`.

| Enums ||
|---|---|
| `STATUS_UNSPECIFIED` | Unspecified. This value is not used. |
| `SUCCESS` | The device was put into lost mode. |
| `RESET_PASSWORD_RECENTLY` | The device could not be put into lost mode because the admin reset the device's password recently. |
| `USER_EXIT_LOST_MODE_RECENTLY` | The device could not be put into lost mode because the user exited lost mode recently. |
| `ALREADY_IN_LOST_MODE` | The device is already in lost mode. |

## StopLostModeStatus

Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.STOP_LOST_MODE` command to take the device out of lost mode.

| JSON representation |
|---|
| ``` { "status": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_1`) } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_1`)`` The status. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus`. |

## Status

The status. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#StopLostModeStatus`.

| Enums ||
|---|---|
| `STATUS_UNSPECIFIED` | Unspecified. This value is not used. |
| `SUCCESS` | The device was taken out of lost mode. |
| `NOT_IN_LOST_MODE` | The device is not in lost mode. |

## EsimCommandStatus

Status and error details (if present) of an `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` or `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command.

| JSON representation |
|---|
| ``` { "status": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_2`), "esimInfo": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimInfo`) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "internalErrorDetails": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_2`)`` Output only. Status of an `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` or `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command. |
| `esimInfo` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimInfo`)`` Output only. Information about the eSIM added or removed. This is populated only when the eSIM operation `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus.FIELDS.status` is `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_2.ENUM_VALUES.SUCCESS`. |
| Details of the status of an `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` or `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `internalErrorDetails` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails`)`` Output only. Details of the error if the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus.FIELDS.status` is set to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_2.ENUM_VALUES.INTERNAL_ERROR`. |
| End of mutually exclusive fields. ||

## Status

Status of an `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` or `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command.

| Enums ||
|---|---|
| `STATUS_UNSPECIFIED` | Unspecified. This value is not used. |
| `SUCCESS` | The eSIM operation was successfully performed on the device. |
| `IN_PROGRESS` | The eSIM operation is in progress. |
| `PENDING_USER_ACTION` | The user needs to take an action for the eSIM operation to proceed. When `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` is issued, this can happen when the device requires user consent to install or activate the eSIM, or when the eSIM profile requires a confirmation code that was not provided in `` `confirmationCode` ``. |
| `ERROR_SETUP_IN_PROGRESS` | The eSIM operation cannot be executed when setup is in progress. |
| `ERROR_USER_DENIED` | The user has denied the eSIM operation. |
| `INTERNAL_ERROR` | An error has occurred while trying to add or remove the eSIM on the device, see `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EsimCommandStatus.FIELDS.internal_error_details`. |
| `ERROR_ICC_ID_NOT_FOUND` | For a `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command, the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RemoveEsimParams.FIELDS.icc_id` of the eSIM to be removed was not found on the device. This could either mean the eSIM does not belong to the enterprise or the eSIM corresponding to the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RemoveEsimParams.FIELDS.icc_id` is not present on the device. |
| `ERROR_MULTIPLE_ACTIVE_ESIMS_NO_AVAILABLE_SLOT` | The `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` command failed when attempting to add a new eSIM with its activation state set to `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState.ENUM_VALUES.ACTIVATED` since multiple eSIM slots on the device contain active eSIM profiles and there is no free eSIM slot available. To resolve this, the new eSIM can be added with its activation state as `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ActivationState.ENUM_VALUES.NOT_ACTIVATED` for later manual activation, or the user must first deactivate an existing active eSIM for the operation to proceed. |

## InternalErrorDetails

Internal error details if present for the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` or `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REMOVE_ESIM` command.

| JSON representation |
|---|
| ``` { "operationCode": string, "errorCode": string, "operationCodeDetail": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#OperationCodeDetail`), "errorCodeDetail": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ErrorCodeDetail`) } ``` |

| Fields ||
|---|---|
| `operationCode` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. Integer representation of the operation code as specified [here](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE). See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.operation_code_detail` for more details. |
| `errorCode` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. Integer representation of the error code as specified [here](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE). See also, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#OperationCodeDetail.ENUM_VALUES.OPERATION_SMDX_SUBJECT_REASON_CODE`. See `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code_detail` for more details. |
| `operationCodeDetail` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#OperationCodeDetail`)`` Output only. The operation code detail corresponding to the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.operation_code`. |
| `errorCodeDetail` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#ErrorCodeDetail`)`` Output only. The error code detail corresponding to the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code`. |

## OperationCodeDetail

The operation code detail corresponding to the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.operation_code`.

| Enums ||
|---|---|
| `OPERATION_CODE_DETAIL_UNSPECIFIED` | Operation code detail is unspecified. The `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.operation_code` is not recognized by Android Management API. However, see `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.operation_code`. |
| `OPERATION_SYSTEM` | See [EuiccManager.OPERATION_SYSTEM](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_SYSTEM) for details. |
| `OPERATION_SIM_SLOT` | See [EuiccManager.OPERATION_SIM_SLOT](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_SIM_SLOT) for details. |
| `OPERATION_EUICC_CARD` | See [EuiccManager.OPERATION_EUICC_CARD](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_EUICC_CARD) for details. |
| `OPERATION_SMDX` | See [EuiccManager.OPERATION_SMDX](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_SMDX) for details. |
| `OPERATION_SWITCH` | See [EuiccManager.OPERATION_SWITCH](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_SWITCH) for details. |
| `OPERATION_DOWNLOAD` | See [EuiccManager.OPERATION_DOWNLOAD](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_DOWNLOAD) for details. |
| `OPERATION_METADATA` | See [EuiccManager.OPERATION_METADATA](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_METADATA) for details. |
| `OPERATION_EUICC_GSMA` | See [EuiccManager.OPERATION_EUICC_GSMA](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_EUICC_GSMA) for details. |
| `OPERATION_APDU` | See [EuiccManager.OPERATION_APDU](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_APDU) for details. |
| `OPERATION_SMDX_SUBJECT_REASON_CODE` | See [EuiccManager.OPERATION_SMDX_SUBJECT_REASON_CODE](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_SMDX_SUBJECT_REASON_CODE) for details. Note that, in this case, `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code` is the least significant 3 bytes of the [`EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE`](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#EXTRA_EMBEDDED_SUBSCRIPTION_DETAILED_CODE) specifying the subject code and the reason code as indicated [here](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_SMDX_SUBJECT_REASON_CODE). The most significant byte of the integer is zeroed out. For example, a Subject Code of 8.11.1 and a Reason Code of 5.1 is represented in `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code` as 0000 0000 1000 1011 0001 0000 0101 0001 in binary, which is 9113681 in decimal. |
| `OPERATION_HTTP` | See [EuiccManager.OPERATION_HTTP](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#OPERATION_HTTP) for details. |

## ErrorCodeDetail

Error code detail corresponding to the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code`.

| Enums ||
|---|---|
| `ERROR_CODE_DETAIL_UNSPECIFIED` | Error code detail is unspecified. The `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code` is not recognized by Android Management API. However, see `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#InternalErrorDetails.FIELDS.error_code` |
| `ERROR_TIME_OUT` | See [EuiccManager.ERROR_TIME_OUT](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_TIME_OUT) for details. |
| `ERROR_EUICC_MISSING` | See [EuiccManager.ERROR_EUICC_MISSING](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_EUICC_MISSING) for details. |
| `ERROR_UNSUPPORTED_VERSION` | See [EuiccManager.ERROR_UNSUPPORTED_VERSION](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_UNSUPPORTED_VERSION) for details. |
| `ERROR_ADDRESS_MISSING` | See [EuiccManager.ERROR_ADDRESS_MISSING](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_ADDRESS_MISSING) for details. |
| `ERROR_INVALID_CONFIRMATION_CODE` | The confirmation code is invalid. When `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.ADD_ESIM` is issued, this is reported when the carrier rejects the provided `` `confirmationCode` ``. See [EuiccManager.ERROR_INVALID_CONFIRMATION_CODE](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_INVALID_CONFIRMATION_CODE) for details. |
| `ERROR_CERTIFICATE_ERROR` | See [EuiccManager.ERROR_CERTIFICATE_ERROR](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_CERTIFICATE_ERROR) for details. |
| `ERROR_NO_PROFILES_AVAILABLE` | See [EuiccManager.ERROR_NO_PROFILES_AVAILABLE](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_NO_PROFILES_AVAILABLE) for details. |
| `ERROR_CONNECTION_ERROR` | See [EuiccManager.ERROR_CONNECTION_ERROR](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_CONNECTION_ERROR) for details. |
| `ERROR_INVALID_RESPONSE` | See [EuiccManager.ERROR_INVALID_RESPONSE](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_INVALID_RESPONSE) for details. |
| `ERROR_CARRIER_LOCKED` | See [EuiccManager.ERROR_CARRIER_LOCKED](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_CARRIER_LOCKED) for details. |
| `ERROR_DISALLOWED_BY_PPR` | See [EuiccManager.ERROR_DISALLOWED_BY_PPR](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_DISALLOWED_BY_PPR) for details. |
| `ERROR_INVALID_ACTIVATION_CODE` | See [EuiccManager.ERROR_INVALID_ACTIVATION_CODE](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_INVALID_ACTIVATION_CODE) for details. |
| `ERROR_INCOMPATIBLE_CARRIER` | See [EuiccManager.ERROR_INCOMPATIBLE_CARRIER](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_INCOMPATIBLE_CARRIER) for details. |
| `ERROR_OPERATION_BUSY` | See [EuiccManager.ERROR_OPERATION_BUSY](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_OPERATION_BUSY) for details. |
| `ERROR_INSTALL_PROFILE` | See [EuiccManager.ERROR_INSTALL_PROFILE](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_INSTALL_PROFILE) for details. |
| `ERROR_EUICC_INSUFFICIENT_MEMORY` | See [EuiccManager.ERROR_EUICC_INSUFFICIENT_MEMORY](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_EUICC_INSUFFICIENT_MEMORY) for details. |
| `ERROR_INVALID_PORT` | See [EuiccManager.ERROR_INVALID_PORT](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_INVALID_PORT) for details. |
| `ERROR_SIM_MISSING` | See [EuiccManager.ERROR_SIM_MISSING](https://developer.android.com/reference/android/telephony/euicc/EuiccManager#ERROR_SIM_MISSING) for details. |

## EsimInfo

Details of the eSIM added or removed.

| JSON representation |
|---|
| ``` { "iccId": string } ``` |

| Fields ||
|---|---|
| `iccId` | `string` Output only. ICC ID of the eSIM. |

## RequestDeviceInfoStatus

Status of the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` command.

| JSON representation |
|---|
| ``` { "status": enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_3`), // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "eidInfo": { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EidInfo`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_3`)`` Output only. Status of a `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` command. |
| Details of the device information requested by the admin. This is populated only when the `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#RequestDeviceInfoStatus.FIELDS.status` is `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Status_3.ENUM_VALUES.SUCCEEDED`. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `eidInfo` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#EidInfo`)`` Information related to the EIDs of the device. |
| End of mutually exclusive fields. ||

## Status

Status of a `https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#CommandType.ENUM_VALUES.REQUEST_DEVICE_INFO` command.

| Enums ||
|---|---|
| `STATUS_UNSPECIFIED` | Unspecified. This value is not used. |
| `SUCCEEDED` | Device information has been successfully delivered. |
| `PENDING_USER_ACTION` | The user has not completed the actions required to share device information. |
| `USER_DECLINED` | The user declined sharing device information. |
| `UNSUPPORTED` | The requested device info is not supported on this device, e.g. eSIM is not supported on the device. |

## EidInfo

Information related to the EIDs of the device.

| JSON representation |
|---|
| ``` { "eids": [ { object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Eid`) } ] } ``` |

| Fields ||
|---|---|
| `eids[]` | ``object (`https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#Eid`)`` Output only. EID information for each eUICC chip. |

## Eid

EID information for each eUICC chip.

| JSON representation |
|---|
| ``` { "eid": string } ``` |

| Fields ||
|---|---|
| `eid` | `string` Output only. The EID |