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",
"namespace": {
"type": "project",
"_id": "5cb5252a1bbc5a00def564c1",
"name": "tempor",
"accessControl": {
"read": [
"ipsum ea",
"dolor est id",
"do culpa elit nostrud Ut",
"aliqua minim aute dolor"
],
"execute": [
"occaecat deserunt",
"magna aliquip dolore",
"officia id culpa irure in",
"adipisicing nostrud incididunt Excepteur dolore"
],
"write": [
"magna officia velit"
],
"manage": [
"reprehenderit cillum enim ipsum dolore",
"et ea consectetur Duis",
"velit cillum ex minim"
]
}
},
"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
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": false
},
{
"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": true
}
]
},
{
"command": "show running-config ip vrf",
"passRule": false,
"rules": [
{
"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
}