Summary
Create Smart Template
Description
Create a Smart Template from native Config
Route
POST /smart_template/st/autogenerate
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
operating_system |
string |
yes |
NED ID |
native_config |
string |
yes |
Native device configuration |
Copied to Clipboard
{
"operating_system": "iosxr",
"native_config": "interface GigabitEthernet1/1"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"operating_system": {
"type": "string",
"examples": [
"ios",
"junos",
"iosxr"
]
},
"native_config": {
"type": "string",
"examples": [
"hostname someHost",
"interface GigabitEthernet1/1"
]
}
},
"required": [
"operating_system",
"native_config"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
config |
object |
Smart Template object |
Copied to Clipboard
{
"faml": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "error"
},
"_value": "E"
},
"form": {
"name": "Form 123",
"children": [
{
"properties": {
"type": "leafref",
"path": "/ncs:devices/ncs:device/ncs:name",
"min": null,
"max": null,
"minLength": null,
"maxLength": null,
"default": null,
"direction": "vertical",
"required": true,
"enforce": false,
"hidden": false
},
"id": "eiusmod sunt fugiat consectetur",
"type": "container",
"element": "{\"type\":\"service_model\",\"id\":{\"name\":\"/ncs:services/devices:stringified_json\"}",
"name": "vlan_id_123",
"display_name": "vlan",
"source_type": "service_model",
"source": "/ncs:services/abc_devices:ios.device",
"key": "service.vlanid"
}
],
"elements": [
{
"type": "service_model",
"id": {
"name": "/ncs:services/test_devices:service_name"
}
}
],
"_id": "7389ac63-83eb-6a08-bcdb-03367c7e2e18",
"groups": [
"24355ac20f0bbb9a9994ceeb",
"19bb3ad9fff8dbe7bdc39210",
"b43ab39bc8eda7a791c4c3b4",
"7d5daeffe2300257ee3e0719"
],
"created": "2004-09-13T10:10:47.431Z",
"created_by": "5ddb34dfeaa6aeb228aeafd4",
"last_updated": "2011-02-03T05:01:22.103Z",
"last_updated_by": "426e6446d7a59f4e330c42ba",
"tags": [
"Duis ut dolore sit",
"enim eu mollit",
"do"
]
}
}