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": "deserunt officia",
"accessControl": {
"read": [
"mollit",
"veniam",
"dolore anim ea eiusmod",
"aliqua laborum enim",
"ut fugiat"
],
"execute": [
"Ut amet tempor pariatur",
"sunt consectetur enim eiusmod aliqua",
"enim in et dolore",
"Duis esse magna sit",
"in dolore"
],
"write": [
"minim pariatur id tempor",
"sed",
"commodo"
],
"manage": [
"eiusmod Ut exercitation"
]
}
},
"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
}
]
},
{
"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": null
}
}
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
}