AI-generated Key Takeaways
- 
          
Executes a specified command on a device managed by the enterprise using an HTTP POST request.
 - 
          
The request body requires the command name and parameters, formatted as a JSON object.
 - 
          
The response body provides the command execution results, also formatted as a JSON object.
 - 
          
Authorization requires the
https://www.googleapis.com/auth/sdm.serviceOAuth scope. 
Executes a command to device managed by the enterprise.
HTTP request
POST https://smartdevicemanagement.googleapis.com/v1/{name=enterprises/*/devices/*}:executeCommand
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name | 
                
                   
 The name of the device requested. For example: "enterprises/XYZ/devices/123"  | 
              
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
{ "command": string, "params": { object } }  | 
                
| Fields | |
|---|---|
command | 
                  
                     
 The command name to execute, represented by the fully qualified protobuf message name.  | 
                
params | 
                  
                     
 The command message to execute, represented as a Struct.  | 
                
Response body
Response message for SmartDeviceManagementService.ExecuteDeviceCommand
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
{ "results": { object } }  | 
                  
| Fields | |
|---|---|
results | 
                    
                       
 The results of executing the command.  | 
                  
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/sdm.service
For more information, see the OAuth 2.0 Overview.