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",
"devices": [
"Device 2",
"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": false
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
}
],
"device": "device1",
"response": "version: 10.0.0",
"result": false
},
{
"raw": "show version",
"all_pass_flag": false,
"evaluated": "show version",
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
}
],
"device": "device1",
"response": "version: 10.0.0",
"result": false
},
{
"raw": "show version",
"all_pass_flag": true,
"evaluated": "show version",
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
},
{
"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": false
}
]