Summary
Run a Command against Devices
Description
Run a command against devices.
Route
POST /mop/RunCommandDevices
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
command |
string |
yes |
Command to run. |
variables |
object |
yes |
Variables to be run with the command. |
devices |
array |
yes |
Devices the command is run against. |
Copied to Clipboard
{
"command": "show version",
"variables": {
"device_name": "my-device1"
},
"devices": [
"Device 2",
"Device 2"
]
}
Return
DetailsExampleSchema
Name |
Type |
Description |
results |
object |
Result of the command run. |
Copied to Clipboard
[
{
"raw": "show version",
"all_pass_flag": true,
"evaluated": "show version",
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
}
],
"device": "device1",
"response": "version: 10.0.0",
"result": true
},
{
"raw": "show version",
"all_pass_flag": false,
"evaluated": "show version",
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
}
],
"device": "device1",
"response": "version: 10.0.0",
"result": true
}
]