Summary
Update a Command Template
Description
Update a Command Template by ID.
Route
POST /mop/updateTemplate/:mopID
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
mopID |
string |
yes |
ID of the Command Template to update. |
mop |
object |
yes |
Command Template to update. |
Copied to Clipboard
{
"mop": {
"name": "ASR1K-MOP",
"_id": "ASR1K-MOP",
"namespace": {
"type": "project",
"_id": "5cb5252a1bbc5a00def564c1",
"name": "do",
"accessControl": {
"read": [
"deserunt nulla exercitation ut quis",
"anim amet sit nisi elit",
"officia",
"in"
],
"execute": [
"Duis esse irure",
"dolore amet consequat Ut voluptate",
"adipisicing aliqua",
"laborum dolor cillum do tempor"
],
"write": [
"mollit",
"incididunt dolore dolor ullamco exercitation",
"magna dolore",
"eiusmod qui consectetur ea"
],
"manage": [
"Ut consequat veniam aute eu",
"ut sed laborum voluptate",
"deserunt sit irure",
"Duis dolore reprehenderit"
]
}
},
"os": "cisco-ios",
"passRule": false,
"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": true,
"rules": [
{
"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": 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 |
Status of the update. |
Copied to Clipboard
{
"n": 1,
"ok": 1,
"nModified": 1
}