Summary
Run Command Template
Description
Run a Command Template against devices.
Route
POST /mop/RunCommandTemplate
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
template |
string |
yes |
Command Template to be run. |
variables |
object |
yes |
Variables to be run with the Command Template. |
devices |
array |
yes |
Devices to run the Command Template against. |
Copied to Clipboard
{
"template": "show version",
"variables": {
"device_name": "my-device1"
},
"devices": [
"Device 2",
"Device 1",
"Device 2",
"Device 1"
]
}
Return
DetailsExampleSchema
Name |
Type |
Description |
mop_template_results |
object |
Result of the Command Template run. |
Copied to Clipboard
{
"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": 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": true
}