Summary
Import Template
Description
Import a single template
Route
POST /mop/import
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
template |
object |
yes |
A template payload object |
type |
string |
yes |
Template type: choose between 'templates' and 'analytics' |
Copied to Clipboard
{
"template": {
"name": "ASR1K-MOP",
"_id": "ASR1K-MOP",
"namespace": {
"type": "project",
"_id": "5cb5252a1bbc5a00def564c1",
"name": "tempor in do",
"accessControl": {
"read": [
"in sint ad ipsum",
"velit"
],
"execute": [
"culpa ut"
],
"write": [
"nulla occaecat culpa Excepteur",
"amet ipsum dolore dolore",
"do nisi ipsum et nostrud",
"labore",
"velit sunt"
],
"manage": [
"sunt dolor in ex",
"minim non",
"commodo velit",
"aute"
]
}
},
"os": "cisco-ios",
"passRule": false,
"prepostCommands": [
{
"preRawCommand": "show running-config ip prefix-list",
"postRawCommand": "show running-config ip prefix-list",
"passRule": true,
"rules": [
{
"type": "regex",
"preRegex": "",
"postRegex": "",
"evaluation": "="
},
{
"type": "regex",
"preRegex": "",
"postRegex": "",
"evaluation": "="
},
{
"type": "regex",
"preRegex": "",
"postRegex": "",
"evaluation": "="
},
{
"type": "regex",
"preRegex": "",
"postRegex": "",
"evaluation": "="
}
],
"preCommandResHTML": "Test a command or the template to get results here",
"postCommandResHTML": "Test a command or the template to get results here"
}
],
"created": 1508182880981,
"createdBy": "exampleUser",
"lastUpdated": 1508182880981,
"lastUpdatedBy": "exampleUser"
},
"type": "templates"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"template": {
"anyOf": [
{
"title": "template",
"$ref": "mopTemplateDoc"
},
{
"title": "template",
"$ref": "mopAnalyticTemplateDoc"
}
]
},
"type": {
"type": "string",
"title": "type",
"enum": [
"templates",
"analytics"
]
}
},
"required": [
"template",
"type"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
result |
boolean |
Import status |
Copied to Clipboard
false
Copied to Clipboard
{
"title": "result",
"type": "boolean"
}