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": "amet",
"accessControl": {
"read": [
"veniam sunt Ut",
"eiusmod laborum sit",
"aliquip tempor eiusmod id sunt"
],
"execute": [
"sed cillum Ut laborum",
"Excepteur cillum sunt"
],
"write": [
"proident veniam",
"ut adipisicing",
"Ut adipisicing"
],
"manage": [
"proident cupidatat",
"sed",
"eiusmod consequat anim reprehenderit Lorem"
]
}
},
"os": "cisco-ios",
"passRule": true,
"commands": [
{
"command": "show running-config ip vrf",
"passRule": false,
"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": true
},
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
}
]
},
{
"command": "show running-config ip vrf",
"passRule": true,
"rules": [
{
"rule": "show version",
"eval": "contains",
"raw": "show version",
"result": true
}
]
}
],
"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
}