Summary
Create a Command Template
Description
Create a Command Template.
Route
POST /mop/createTemplate
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
mop |
object |
yes |
Command Template to save. |
Copied to Clipboard
{
"mop": {
"name": "ASR1K-MOP",
"_id": "ASR1K-MOP",
"os": "cisco-ios",
"passRule": true,
"commands": [
{
"command": "show running-config ip vrf",
"passRule": false,
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
}
]
},
{
"command": "show running-config ip vrf",
"passRule": false,
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
}
]
},
{
"command": "show running-config ip vrf",
"passRule": false,
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
}
]
},
{
"command": "show running-config ip vrf",
"passRule": true,
"rules": [
{
"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
}
]
}
],
"created": 1508182880981,
"createdBy": "exampleUser",
"lastUpdated": 1508182880981,
"lastUpdatedBy": "exampleUser"
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"mop": {
"$ref": "mopTemplateDoc"
}
},
"required": [
"mop"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
result |
object |
Result of the creation. |
Copied to Clipboard
{
"n": 1,
"ok": 1,
"nModified": 1
}