Summary
Run a Command against a Device
Description
Run a command against a device.
Route
POST /mop/RunCommand
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
command |
string |
yes |
The command to run. |
variables |
object |
yes |
Variables to be run with the command. |
device |
string |
yes |
Device the command is run against. |
Copied to Clipboard
{
"command": "show version",
"variables": {
"device_name": "my-device1"
},
"device": "device1"
}
Return
DetailsExampleSchema
Name |
Type |
Description |
result |
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": false
},
{
"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
}